Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/jnjosh/internet-weblog.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGhyslain Leclerc <ghleclerc@gmail.com>2019-11-27 04:58:18 +0300
committerGhyslain Leclerc <ghleclerc@gmail.com>2019-11-27 04:58:18 +0300
commitdb12d07cb62507aae88e11d63f9ede2302b3e763 (patch)
tree13810ae359775e86e46bdefde47aec316d7ad17e
parente15be0e41037d9d8dc645db0d3e5f0200b8c5e5f (diff)
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.
-rw-r--r--layouts/partials/page_header.html4
1 files changed, 2 insertions, 2 deletions
diff --git a/layouts/partials/page_header.html b/layouts/partials/page_header.html
index dcf3429..c381950 100644
--- a/layouts/partials/page_header.html
+++ b/layouts/partials/page_header.html
@@ -7,9 +7,9 @@
<ul>
{{ range .Site.Menus.main }}
<li>
- <a href="{{.Permalink}}">{{ .Name }}</a>
+ <a href="{{.URL}}">{{ .Name }}</a>
{{ 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 }}
</li>
{{ end }}