mirror of
https://github.com/McShelby/hugo-theme-relearn
synced 2025-04-30 22:32:02 +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 }}
|
{{- if .Site.Params.editURL }}
|
||||||
{{- $File := .File }}
|
{{- $File := .File }}
|
||||||
{{- $Site := .Site }}
|
{{- $Site := .Site }}
|
||||||
|
{{- if $File }}
|
||||||
{{- with $File.Path }}
|
{{- with $File.Path }}
|
||||||
<div id="top-github-link">
|
<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">
|
<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>
|
</div>
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
{{- $defaultDisableToc := .Site.Params.disableToc | default false }}
|
{{- $defaultDisableToc := .Site.Params.disableToc | default false }}
|
||||||
{{- $currentDisableToc := .Params.disableToc | default $defaultDisableToc }}
|
{{- $currentDisableToc := .Params.disableToc | default $defaultDisableToc }}
|
||||||
{{- $hastoc := not (eq 0 (int (len (.TableOfContents | plainify)))) }}
|
{{- $hastoc := not (eq 0 (int (len (.TableOfContents | plainify)))) }}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user