From 000d2655efb7839a6b626fae82bf310bd4b4ab74 Mon Sep 17 00:00:00 2001 From: Ngô Ngọc Đức Huy Date: Mon, 31 Jul 2023 08:43:42 +0700 Subject: Add book section recursion --- layouts/_default/list.html | 38 +++----------------------------------- 1 file changed, 3 insertions(+), 35 deletions(-) (limited to 'layouts/_default/list.html') diff --git a/layouts/_default/list.html b/layouts/_default/list.html index bdcd630..46310ad 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -9,44 +9,12 @@ SPDX-License-Identifier: MIT {{ .Content }} {{ if in .Params.categories "book" }} - {{ $chapters := .Page.Pages }} - {{ range .Page.Translations }} - {{ $chapters = $chapters | lang.Merge .Pages }} - {{ end}}
-
    - {{ range sort $chapters "Weight" }} -
  1. - {{ trim .Title " " }} - {{ partial "post-info.html" . }} -
  2. - {{ end }} -
      + {{ partial "toc.html" . }}
{{ else if in .Params.categories "blog" }} -
-
    - {{ range sort .Pages "Date" "desc" }} -
  1. - : - {{ trim .Title " " }} - {{ partial "post-language-switcher.html" . }} - {{ partial "post-info.html" . }} -
  2. - {{ end }} -
      -
+ {{ partial "feed.html" . }} {{ else }} -
-
+ {{ partial "generic-list.html" . }} {{ end }} {{ end }} -- cgit 1.4.1