mirror of
https://github.com/alex-shpak/hugo-book.git
synced 2025-04-04 12:55:45 +00:00
Fix current page highlight in new Hugo version
This commit is contained in:
parent
831e570f16
commit
a9867292af
@ -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 }}
|
||||
|
Loading…
Reference in New Issue
Block a user