diff options
Diffstat (limited to 'layouts/_default/list.html')
-rw-r--r-- | layouts/_default/list.html | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/layouts/_default/list.html b/layouts/_default/list.html index 7c774d5..bdcd630 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -9,16 +9,18 @@ SPDX-License-Identifier: MIT {{ .Content }} </section> {{ if in .Params.categories "book" }} + {{ $chapters := .Page.Pages }} + {{ range .Page.Translations }} + {{ $chapters = $chapters | lang.Merge .Pages }} + {{ end}} <section class="toc"> <ol> - {{ range .Page.Translations | append .Page }} - {{ range sort .Pages "Weight" }} + {{ range sort $chapters "Weight" }} <li> <a href="{{ .RelPermalink }}">{{ trim .Title " " }}</a> {{ partial "post-info.html" . }} </li> {{ end }} - {{ end }} <ol> </section> {{ else if in .Params.categories "blog" }} |