hugo

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README

commit a88176dd82038ee30e23018bb06d28466ecd1bc0
parent d3a6b31e4a2864a61a3cad0a339c626c38460bad
Author: Luke Smith <Luke Smith>
Date:   Wed, 29 Jun 2022 21:44:09 -0400

show rss feed optional, menu by weight

Diffstat:
Mconfig.toml | 1+
Mlayouts/partials/footer.html | 2+-
Mlayouts/partials/nav.html | 2+-
3 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/config.toml b/config.toml @@ -6,3 +6,4 @@ languageCode = 'en-us' #relatedtext = "Related:" favicon = "/favicon.ico" stylesheet = "/style.css" + showrss = true diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html @@ -14,7 +14,7 @@ </main> <footer> <a href="{{ .Site.BaseURL }}">{{ .Site.BaseURL }}</a></br> - <a href="/index.xml"><img src="/pix/rss.svg" style="max-height:.9em;display:inline" alt=""> Subscribe via RSS for Updates.</a></footer> + {{ if .Site.Params.showrss }}<a href="/index.xml"><img src="/pix/rss.svg" style="max-height:.9em;display:inline" alt=""> Subscribe via RSS for Updates.</a>{{ end }} </footer> </body> </html> diff --git a/layouts/partials/nav.html b/layouts/partials/nav.html @@ -2,7 +2,7 @@ <nav> <ul> {{- $sec := .Page.Section }}{{ $file := .File.TranslationBaseName -}} - {{ range.Site.Menus.main }}{{ $base := path.Base .URL }} + {{ range.Site.Menus.main.ByWeight }}{{ $base := path.Base .URL }} <a {{ if or ( eq $sec $base ) ( eq $file $base ) ( and (eq $sec "") ( eq $file "_index") (eq $base "/") ) }}class="menuactive" {{ end }}href="{{ .URL }}"><li><span class=pre>{{ .Pre }}</span><span class=menuname>{{ .Name }}</span></li></a> {{- end }} </ul>