Merge pull request #18097 from dvdksn/fix-edit-page-link-upstream

hugo: remove edit page link for upstream pages
This commit is contained in:
David Karlsson 2023-09-04 14:28:31 +02:00 committed by GitHub
commit fbfd79bdaf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 15 additions and 9 deletions

View File

@ -1,14 +1,20 @@
{{ if hugo.IsProduction }}
{{ if .File }}
{{ with .File }}
{{ if not (in .Filename "/_vendor/") }}
<p class="flex items-center gap-2">
<span class="material-symbols-rounded">edit</span><a class="link"
href="{{ site.Params.repo }}/edit/main/content/{{ .File.Path }}">{{ T "editPage" }}
<span class="material-symbols-rounded align-middle text-base">open_in_new</span></a>
</p>
<p class="flex items-center gap-2">
<span class="material-symbols-rounded">done</span><a class="link" target="_blank" rel="noopener"
href="{{ site.Params.repo }}/issues/new?template=doc_issue.yml&location={{ .Permalink }}&labels=status%2Ftriage"
>{{ T "requestChanges" }}<span class="material-symbols-rounded align-middle text-base">open_in_new</span></a>
<span class="material-symbols-rounded">edit</span>
<a class="link" target="_blank" rel="noopener"
href="{{ site.Params.repo }}/edit/main/content/{{ .Path }}">{{ T "editPage" }}
<span class="material-symbols-rounded align-middle text-base">open_in_new</span>
</a>
</p>
{{ end }}
{{ end }}
<p class="flex items-center gap-2">
<span class="material-symbols-rounded">done</span>
<a class="link" target="_blank" rel="noopener"
href="{{ site.Params.repo }}/issues/new?template=doc_issue.yml&location={{ .Permalink }}&labels=status%2Ftriage">{{ T "requestChanges" }}
<span class="material-symbols-rounded align-middle text-base">open_in_new</span>
</a>
</p>
{{ end }}