diff options
author | Michał M. Sapka <michal@sapka.me> | 2023-05-17 18:45:46 +0200 |
---|---|---|
committer | Michał M. Sapka <michal@sapka.me> | 2023-05-17 18:45:46 +0200 |
commit | 5fb58719af26c49a8955d82c729c7de3e80f081f (patch) | |
tree | f829ad21744d8966d92dbb8b2cb077d3dd7b529b /layouts/shortcodes/categories.html | |
parent | 5c8bba4533198443ee742cf1d155ff11c2e94574 (diff) |
fix: categories
Diffstat (limited to 'layouts/shortcodes/categories.html')
-rw-r--r-- | layouts/shortcodes/categories.html | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/layouts/shortcodes/categories.html b/layouts/shortcodes/categories.html new file mode 100644 index 0000000..c114f15 --- /dev/null +++ b/layouts/shortcodes/categories.html @@ -0,0 +1,7 @@ +{{ range $name, $taxonomy := .Site.Taxonomies.category }} + {{ $cnt := .Count }} + {{ with $.Site.GetPage (printf "/category/%s" $name) }} + <a href={{ .RelPermalink }} title="All pages with tag <i>{{$name}}</i>">{{$name}}</a> + <sup>{{$cnt}}</sup> + {{end}} +{{ end }} |