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

github.com/darshanbaral/khata.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDarshan Baral <darshanbaral@gmail.com>2019-07-04 05:58:53 +0300
committerDarshan Baral <darshanbaral@gmail.com>2019-07-04 05:58:53 +0300
commit391e66a84cac3742bff95fb4404dcebc48f62a58 (patch)
treea01698b06e25b7b983c4db45561016854d5acfc2
parent45e96643bb27c2e3261fa9475d026ec6351e609d (diff)
Fixed section menu if only one section
-rw-r--r--layouts/partials/menu/menu_sections.html6
1 files changed, 4 insertions, 2 deletions
diff --git a/layouts/partials/menu/menu_sections.html b/layouts/partials/menu/menu_sections.html
index a07c049..77143f8 100644
--- a/layouts/partials/menu/menu_sections.html
+++ b/layouts/partials/menu/menu_sections.html
@@ -1,6 +1,8 @@
-{{ if eq 1 (len .Site.Sections) }}
+{{ if eq (len (where .Site.Sections "Params.hidefrommenu" "!=" true)) 1 }}
<div class="main-menu">
- <a href="{{ `/` | relURL }}">Home</a>
+ {{ with (index (where .Site.Sections "Params.hidefrommenu" "!=" true) 0) }}
+ <a href="{{ .Permalink }}">{{ .Title }}</a>
+ {{ end }}
</div>
{{ else }}
<div class="dropdown">