Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/jeremybise/twentynineteen-hugo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Bise <jeremy.bise@thosegeeks.com>2019-04-17 20:03:19 +0300
committerJeremy Bise <jeremy.bise@thosegeeks.com>2019-04-17 20:03:19 +0300
commitb642fb987f05e1c568945384ff8d747d0cb1a28e (patch)
tree44490659e53cccf084159b733de1cfa091975491
parent1f9d0aa9759be12a7268e6d342938dbc9342c4cc (diff)
taxonomy terms templates
-rw-r--r--layouts/_default/terms.html24
1 files changed, 24 insertions, 0 deletions
diff --git a/layouts/_default/terms.html b/layouts/_default/terms.html
new file mode 100644
index 0000000..9779713
--- /dev/null
+++ b/layouts/_default/terms.html
@@ -0,0 +1,24 @@
+{{ define "main" }}
+ <article class="post entry">
+ <div class="entry-header">
+ <h1 class="entry-title">{{ .Title }}</h1>
+ </div>
+ <div class="entry-content">
+ <ul>
+ {{ $type := .Type }}
+ {{ range $key, $value := .Data.Terms.ByCount }}
+ {{ $name := .Name }}
+ {{ $count := .Count }}
+ {{ with $.Site.GetPage (printf "/%s/%s" $type $name) }}
+ <li>
+ {{ printf "(%d)" $count }}
+ <a href="{{ .Permalink }}">
+ {{ $name }}
+ </a>
+ </li>
+ {{ end }}
+ {{ end }}
+ </ul>
+ </div>
+ </article>
+{{ end }} \ No newline at end of file