hugo: remove edit page link for upstream pages

Signed-off-by: David Karlsson <35727626+dvdksn@users.noreply.github.com>
This commit is contained in:
David Karlsson 2023-09-04 08:37:52 +02:00
parent 7d6ddf6eea
commit ff6b76cdeb
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 }}