From d6290dcf509c84a38df667813ad3acdcf58c09f5 Mon Sep 17 00:00:00 2001 From: Alex Shpak Date: Thu, 19 Dec 2019 17:22:12 +0100 Subject: #66, add taxonomy support --- layouts/taxonomy/list.html | 13 +++++++++++++ layouts/taxonomy/taxonomy.html | 22 ++++++++++++++++++++++ 2 files changed, 35 insertions(+) (limited to 'layouts/taxonomy') diff --git a/layouts/taxonomy/list.html b/layouts/taxonomy/list.html index e69de29..31ecd90 100644 --- a/layouts/taxonomy/list.html +++ b/layouts/taxonomy/list.html @@ -0,0 +1,13 @@ +{{ define "main" }} +
+

{{ .Title | title }}

+ {{ $taxonomies := index .Site.Taxonomies .Page.Type }} + {{ range $taxonomies }} +
{{ .Page.Title }} {{ .Count }}
+ {{ end }} +
+{{ end }} + +{{ define "toc" }} + {{ partial "docs/taxonomy" . }} +{{ end }} diff --git a/layouts/taxonomy/taxonomy.html b/layouts/taxonomy/taxonomy.html index e69de29..91a7458 100644 --- a/layouts/taxonomy/taxonomy.html +++ b/layouts/taxonomy/taxonomy.html @@ -0,0 +1,22 @@ +{{ define "main" }} + {{ $paginator := .Paginate (where .Pages "Params.hidden" "ne" true) }} + {{ range sort .Paginator.Pages }} +
+

+ {{ .Title }} +

+ {{ partial "docs/post-meta" . }} +

+ {{- .Summary -}} + {{ if .Truncated }} + ... + {{ end }} +

+
+ {{ end }} + {{ template "_internal/pagination.html" . }} +{{ end }} + +{{ define "toc" }} + {{ partial "docs/taxonomy" . }} +{{ end }} -- cgit v1.2.3