aboutsummaryrefslogtreecommitdiff
path: root/layouts
diff options
context:
space:
mode:
authorAlex Shpak <alex-shpak@users.noreply.github.com>2020-03-30 18:00:15 +0200
committerAlex Shpak <alex-shpak@users.noreply.github.com>2020-03-30 18:00:15 +0200
commita9867292af9c11138e2f4d145240dc890a5b8d66 (patch)
tree162cbc435a8b0c1473a72d31b2b72a688dd12c2f /layouts
parent831e570f16d8abc29fe34c50a8ec0bec4406475c (diff)
Fix current page highlight in new Hugo version
Diffstat (limited to 'layouts')
-rw-r--r--layouts/partials/docs/menu-filetree.html6
1 files changed, 3 insertions, 3 deletions
diff --git a/layouts/partials/docs/menu-filetree.html b/layouts/partials/docs/menu-filetree.html
index a367b1a..e3db53b 100644
--- a/layouts/partials/docs/menu-filetree.html
+++ b/layouts/partials/docs/menu-filetree.html
@@ -38,9 +38,9 @@
{{ with .Section }}
<ul>
{{ range where .Pages "Params.bookhidden" "!=" "true" }}
- {{ if eq .Kind "section" }}
+ {{ if .IsSection }}
{{ template "book-section" (dict "Section" . "CurrentPage" $.CurrentPage) }}
- {{ else if and (eq .Kind "page") .Content }}
+ {{ else if and .IsPage .Content }}
<li>
{{- template "book-page-link" (dict "Page" . "CurrentPage" $.CurrentPage) -}}
</li>
@@ -57,7 +57,7 @@
{{ if .Content }}
<a href="{{ .RelPermalink }}" class="
{{- if and .Params.bookCollapseSection .IsSection }}collapsed {{ end }}
- {{- if eq $.CurrentPage . }}active{{ end }}">
+ {{- if eq $.CurrentPage.RelPermalink .RelPermalink }}active{{ end }}">
{{- partial "docs/title" . -}}
</a>
{{ else }}