Skip to content

Commit

Permalink
theme: remove Hugo build warning if page is not file based
Browse files Browse the repository at this point in the history
  • Loading branch information
McShelby committed Feb 23, 2022
1 parent fee394c commit df232b8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion layouts/partials/header.html
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down

0 comments on commit df232b8

Please sign in to comment.