From ad0108872590a9bcde679a46e08d4ec7e47ee71e Mon Sep 17 00:00:00 2001 From: gribse Date: Fri, 18 Apr 2025 11:03:06 +0200 Subject: [PATCH] add back shortcodes from old blog-structure --- layouts/shortcodes/liste-categories.html | 8 ++++++++ layouts/shortcodes/posts-compteur.html | 1 + layouts/shortcodes/posts-recents.html | 8 ++++++++ 3 files changed, 17 insertions(+) create mode 100755 layouts/shortcodes/liste-categories.html create mode 100755 layouts/shortcodes/posts-compteur.html create mode 100755 layouts/shortcodes/posts-recents.html diff --git a/layouts/shortcodes/liste-categories.html b/layouts/shortcodes/liste-categories.html new file mode 100755 index 0000000..cc958ff --- /dev/null +++ b/layouts/shortcodes/liste-categories.html @@ -0,0 +1,8 @@ +{{range $name, $taxonomy := .Site.Taxonomies.tags}} {{ $cnt := .Count }} + {{ with $.Site.GetPage (printf "/tags/%s" $name) }} +
+ {{$name}} + {{$cnt}} +
+ {{end}} +{{end}} \ No newline at end of file diff --git a/layouts/shortcodes/posts-compteur.html b/layouts/shortcodes/posts-compteur.html new file mode 100755 index 0000000..f81ce06 --- /dev/null +++ b/layouts/shortcodes/posts-compteur.html @@ -0,0 +1 @@ +{{ len (where .Site.RegularPages "Section" "blog") }} \ No newline at end of file diff --git a/layouts/shortcodes/posts-recents.html b/layouts/shortcodes/posts-recents.html new file mode 100755 index 0000000..e7c99d4 --- /dev/null +++ b/layouts/shortcodes/posts-recents.html @@ -0,0 +1,8 @@ +{{- $count := .Get 0 | default "5" -}} + \ No newline at end of file