diff options
-rw-r--r-- | layouts/partials/sidebar.html | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/layouts/partials/sidebar.html b/layouts/partials/sidebar.html index f3f7b61..12a0a09 100644 --- a/layouts/partials/sidebar.html +++ b/layouts/partials/sidebar.html @@ -11,6 +11,10 @@ <nav class="sidebar-nav"> <a class="sidebar-nav-item {{ if .IsHome }} active {{ end }}" href="/">Home</a> <a class="sidebar-nav-item {{ if eq .RelPermalink "/post/" }} active {{ end }}" href="/post">Posts</a> + {{- $currentPage := . }} + {{- range .Site.Menus.main -}} + <a class="sidebar-nav-item{{if or ($currentPage.IsMenuCurrent "main" .) ($currentPage.HasMenuCurrent "main" .) }} active{{end}}" href="{{ .URL }}" title="{{ .Title }}">{{ .Name }}</a> + {{- end -}} {{- $thisperma := .Permalink }} {{ range .Site.Pages.ByWeight -}} |