Skip to content
This repository has been archived by the owner on Jul 1, 2024. It is now read-only.

Commit

Permalink
edit this page - links (#2995)
Browse files Browse the repository at this point in the history
  • Loading branch information
sean1588 authored Jun 7, 2023
1 parent 1478bd4 commit cf938ca
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion themes/default/layouts/partials/docs/table-of-contents.html
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,15 @@ <h2 class="no-anchor">On this page</h2>
{{ $isCLICommand := hasPrefix .Path "docs/cli/commands" }}
{{ $isAPIDoc := and (hasPrefix .Path "docs/reference/pkg/") (ne .Path "docs/reference/pkg/_index.md") }}
{{ if not (or $isCLICommand $isAPIDoc $.Page.Params.no_edit_this_page) }}
{{ $repoURL := "https://github.com/pulumi/pulumi-hugo" }}
{{ if (hasPrefix .Path "registry/") }}
{{ $repoURL = "https://github.com/pulumi/registry" }}
{{ end }}
<li>
<a
data-track="edit-page"
class="text-gray-600 hover:text-gray-700 text-xs"
href="{{ $.Site.Params.contentRepositoryURL }}/edit/{{ $.Site.Params.contentRepositoryBaseBranch }}/{{ getenv "REPO_THEME_PATH" }}content/{{ .Path }}"
href="{{ $repoURL }}/edit/{{ $.Site.Params.contentRepositoryBaseBranch }}/{{ getenv "REPO_THEME_PATH" }}content/{{ .Path }}"
target="_blank"
>
<i class="fas fa-edit mr-2" style="width: 14px"></i>Edit this Page
Expand Down

0 comments on commit cf938ca

Please sign in to comment.