From 23fb7fb982e727bfdb77b367cd4104f120c41cb4 Mon Sep 17 00:00:00 2001 From: Alexander Popov Date: Fri, 2 Sep 2022 23:51:32 +0300 Subject: [PATCH] add tags --- themes/papercut/layouts/_default/terms.html | 22 ++++++++++++++++++++ themes/papercut/layouts/partials/header.html | 1 + 2 files changed, 23 insertions(+) create mode 100644 themes/papercut/layouts/_default/terms.html diff --git a/themes/papercut/layouts/_default/terms.html b/themes/papercut/layouts/_default/terms.html new file mode 100644 index 0000000..f36a5c9 --- /dev/null +++ b/themes/papercut/layouts/_default/terms.html @@ -0,0 +1,22 @@ +{{- define "main" }} +
+
+
+

Теги

+
+ +
+ {{- $type := .Type }} + {{- range $key, $value := .Data.Terms.Alphabetical }} + {{- $name := .Name }} + {{- $count := .Count }} + {{- with site.GetPage (printf "/%s/%s" $type $name) }} + {{ .Name }} + {{ $count }} + + {{- end }} + {{- end }} +
+
+
+{{ end }} diff --git a/themes/papercut/layouts/partials/header.html b/themes/papercut/layouts/partials/header.html index e107695..027afd7 100644 --- a/themes/papercut/layouts/partials/header.html +++ b/themes/papercut/layouts/partials/header.html @@ -9,6 +9,7 @@
Blog  + Tags  💀 🔵 🔴