Adjust .File usage to get rid of WARNINGs
Note that this requires this fix in Hugo 0.55.2: https://github.com/gohugoio/hugo/issues/5865
This commit is contained in:
committed by
Alex Shpak
parent
4054b1b520
commit
5affd26bfb
@@ -10,9 +10,9 @@
|
||||
{{ end }}
|
||||
{{ with .Site.Params.BookEditPath }}
|
||||
<div>
|
||||
<a href="{{ $.Site.Params.BookRepo }}/{{ . }}/{{ $.File.Path }}" target="_blank" rel="noopener">
|
||||
{{ if $.File }}<a href="{{ $.Site.Params.BookRepo }}/{{ . }}/{{ $.File.Path }}" target="_blank" rel="noopener">
|
||||
<img src="{{ "svg/code-fork.svg" | relURL }}" /> Edit this page
|
||||
</a>
|
||||
</a>{{ end }}
|
||||
</div>
|
||||
{{ end }}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user