Using .URL in menu items instead of .Permalink
Using .Permalink was causing my site to not compile anymore with version 0.59.1 of Hugo. According to this issue on the Hugo Github repository: https://github.com/gohugoio/hugo/issues/5868 in menus, .URL is not deprecated and can/should be kept.
This commit is contained in:
parent
e15be0e410
commit
db12d07cb6
1 changed files with 2 additions and 2 deletions
|
@ -7,9 +7,9 @@
|
||||||
<ul>
|
<ul>
|
||||||
{{ range .Site.Menus.main }}
|
{{ range .Site.Menus.main }}
|
||||||
<li>
|
<li>
|
||||||
<a href="{{.Permalink}}">{{ .Name }}</a>
|
<a href="{{.URL}}">{{ .Name }}</a>
|
||||||
{{ if in ($.Scratch.Get "sections") .Name }}
|
{{ if in ($.Scratch.Get "sections") .Name }}
|
||||||
<a href="{{.Permalink}}index.xml"><img src="/img/rss.svg" class="rss-icon" /></a>
|
<a href="{{.URL}}index.xml"><img src="/img/rss.svg" class="rss-icon" /></a>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</li>
|
</li>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
Loading…
Add table
Reference in a new issue