theme: remove Hugo build warning if page is not file based

This commit is contained in:
Sören Weber 2022-02-23 20:21:48 +01:00
parent fee394cd64
commit df232b84fa
No known key found for this signature in database
GPG key ID: 07D17FF580AE7589

View file

@ -59,12 +59,14 @@
{{- if .Site.Params.editURL }}
{{- $File := .File }}
{{- $Site := .Site }}
{{- with $File.Path }}
{{- if $File }}
{{- with $File.Path }}
<div id="top-github-link">
<a class="github-link" title='{{ T "Edit-this-page" }}' href="{{ $Site.Params.editURL }}{{ replace $File.Dir "\\" "/" }}{{ $File.LogicalName }}" target="blank">
<i class="fas fa-pen fa-fw"></i>
</a>
</div>
{{- end }}
{{- end }}
{{- end }}
{{- $defaultDisableToc := .Site.Params.disableToc | default false }}