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,6 +59,7 @@
{{- if .Site.Params.editURL }}
{{- $File := .File }}
{{- $Site := .Site }}
{{- 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">
@ -67,6 +68,7 @@
</div>
{{- end }}
{{- end }}
{{- end }}
{{- $defaultDisableToc := .Site.Params.disableToc | default false }}
{{- $currentDisableToc := .Params.disableToc | default $defaultDisableToc }}
{{- $hastoc := not (eq 0 (int (len (.TableOfContents | plainify)))) }}