diff options
Diffstat (limited to 'documentation/themes/beastie/layouts/shortcodes/list-books-directories.html')
-rw-r--r-- | documentation/themes/beastie/layouts/shortcodes/list-books-directories.html | 33 |
1 files changed, 5 insertions, 28 deletions
diff --git a/documentation/themes/beastie/layouts/shortcodes/list-books-directories.html b/documentation/themes/beastie/layouts/shortcodes/list-books-directories.html index 46e8aef165..d98353f942 100644 --- a/documentation/themes/beastie/layouts/shortcodes/list-books-directories.html +++ b/documentation/themes/beastie/layouts/shortcodes/list-books-directories.html @@ -1,14 +1,3 @@ -{{ $books := slice}} - -{{ range where .Site.Pages "Section" "books" }} - {{ with .File }} - {{ $subDirsNumer := .File.Path | strings.Count "/" }} - {{ if eq $subDirsNumer 2 }} - {{ $books = $books | append (dict "page" . "path" .File.Path) }} - {{ end }} - {{ end }} -{{ end }} - {{ partial "global-search.html" . }} <h1>{{ i18n "books" }}</h1> @@ -17,25 +6,13 @@ <hr class="line"/> -{{ $books := slice}} - -{{ range where .Site.Pages "Section" "books" }} - {{ $subDirsNumer := .File.Path | strings.Count "/" }} - {{ if eq $subDirsNumer 2 }} - {{ $books = $books | append (dict "page" . "path" .File.Path) }} - {{ end }} -{{ end }} +<ul class="documents-list"> -<ul class="articles-books-list"> -{{ range sort $books "bookOrder" "path" }} - {{ if in .path "_index.adoc" }} - {{ $bookPath := replaceRE "/_index.adoc" "" .path }} - {{ $bookPath = replaceRE "books/" "" $bookPath }} - {{ $articleName := replaceRE "books/" "" $bookPath }} +{{ $books := .Site.GetPage "section" "books" }} +{{ range $books.Sections }} <li> - <a href="{{ $bookPath }}"><strong>{{ .page.Title }}</strong></a> - <p>{{ .page.Params.description }}</p> + <a href="{{ .Permalink }}"><strong>{{ .Title }}</strong></a> + <p>{{ .Params.description }}</p> </li> - {{ end }} {{ end }} </ul> |