aboutsummaryrefslogtreecommitdiff
path: root/layouts/taxonomy
diff options
context:
space:
mode:
authorAlex Shpak <alex-shpak@users.noreply.github.com>2019-12-19 17:22:12 +0100
committerAlex Shpak <alex-shpak@users.noreply.github.com>2019-12-19 17:22:12 +0100
commitd6290dcf509c84a38df667813ad3acdcf58c09f5 (patch)
tree8cc7c6134148e24df3c12589b7faa12cadf4fb71 /layouts/taxonomy
parentf5a52e6ed124526ebd070480068e6e145af11d9a (diff)
#66, add taxonomy support
Diffstat (limited to 'layouts/taxonomy')
-rw-r--r--layouts/taxonomy/list.html13
-rw-r--r--layouts/taxonomy/taxonomy.html22
2 files changed, 35 insertions, 0 deletions
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" }}
+<article class="markdown">
+ <h1>{{ .Title | title }}</h1>
+ {{ $taxonomies := index .Site.Taxonomies .Page.Type }}
+ {{ range $taxonomies }}
+ <div><a href="{{ .Page.Permalink }}">{{ .Page.Title }} <sup>{{ .Count }}</sup></a></div>
+ {{ end }}
+</article>
+{{ 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 }}
+ <article class="markdown book-post">
+ <h2>
+ <a href="{{ .RelPermalink }}">{{ .Title }}</a>
+ </h2>
+ {{ partial "docs/post-meta" . }}
+ <p>
+ {{- .Summary -}}
+ {{ if .Truncated }}
+ <a href="{{ .RelPermalink }}">...</a>
+ {{ end }}
+ </p>
+ </article>
+ {{ end }}
+ {{ template "_internal/pagination.html" . }}
+{{ end }}
+
+{{ define "toc" }}
+ {{ partial "docs/taxonomy" . }}
+{{ end }}