mirror of
https://github.com/McShelby/hugo-theme-relearn
synced 2025-04-30 16:54:49 +08:00
theme: remove Hugo build warning if page is not file based
This commit is contained in:
parent
fee394cd64
commit
df232b84fa
@ -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)))) }}
|
||||
|
Loading…
x
Reference in New Issue
Block a user