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:
Ghyslain Leclerc 2019-11-26 20:58:18 -05:00
parent e15be0e410
commit db12d07cb6

View file

@ -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 }}