summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRunxi Yu <me@runxiyu.org>2025-03-02 09:45:58 +0800
committerRunxi Yu <me@runxiyu.org>2025-03-02 09:45:58 +0800
commit89e98249644407a3f918aa1f403228bfc2a0ec4d (patch)
treeeda82ff9d6ad682c64d3eb246ddf1a7575b5336b
parentForge setup (diff)
downloadwebsite-89e98249644407a3f918aa1f403228bfc2a0ec4d.tar.gz
website-89e98249644407a3f918aa1f403228bfc2a0ec4d.tar.zst
website-89e98249644407a3f918aa1f403228bfc2a0ec4d.zip
Fix nav state
-rw-r--r--layouts/_default/baseof.html8
1 files changed, 4 insertions, 4 deletions
diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html
index 6f55b57..3fbc126 100644
--- a/layouts/_default/baseof.html
+++ b/layouts/_default/baseof.html
@@ -12,18 +12,18 @@
<p style="text-align: center; font-weight: bold;">
<a href="/">{{ .Site.Title }}</a>
</p>
- {{ $currentSection := .CurrentSection }}
+ {{ $currentPage := . }}
<ul>
{{ range .Site.Sections }}
- {{ if eq $currentSection . }}
+ {{ if eq $currentPage . }}
<li class="nav-current"><a href="{{ .RelPermalink }}">{{ .Title }}</a></li>
{{ else }}
<li><a href="{{ .RelPermalink }}">{{ .Title }}</a></li>
{{ end }}
- {{ if or (eq $currentSection .) ($currentSection.IsDescendant .) }}
+ {{ if or (eq $currentPage .) ($currentPage.IsDescendant .) }}
<ul>
{{ range .Pages }}
- {{ if eq $currentSection . }}
+ {{ if eq $currentPage . }}
<li class="nav-current"><a href="{{ .RelPermalink }}">{{ .Title }}</a></li>
{{ else }}
<li><a href="{{ .RelPermalink }}">{{ .Title }}</a></li>