diff options
Diffstat (limited to 'layouts/partials/toc.html')
-rw-r--r-- | layouts/partials/toc.html | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/layouts/partials/toc.html b/layouts/partials/toc.html index 607e7f0..3b5a822 100644 --- a/layouts/partials/toc.html +++ b/layouts/partials/toc.html @@ -1,4 +1,5 @@ -{{ $chapters := .Page.Pages }} +{{ $chapters := .content.Page.Pages }} +{{ $currentLink := .currentLink}} {{ range .Page.Translations }} {{ $chapters = $chapters | lang.Merge .Pages }} {{ end}} @@ -9,10 +10,14 @@ {{ with .Params.chapterName }} {{ $fullTitle = printf "%s – %s" $fullTitle . }} {{ end }} - <a href="{{ .RelPermalink }}">{{ trim $fullTitle " " }}</a> + {{ if eq $currentLink .RelPermalink }} + <a aria-current="page">{{ trim $fullTitle " " }}</a> ({{ i18n "current"}}) + {{ else }} + <a href="{{ .RelPermalink }}">{{ trim $fullTitle " " }}</a> + {{ end }} {{ partial "post-info.html" . }} {{ if .IsSection}} - {{ partial "toc.html" . }} + {{ partial "toc.html" (dict "content" . "currentLink" $currentLink) }} {{ end }} </li> {{ end }} |