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