add back shortcodes from old blog-structure

This commit is contained in:
gribse 2025-04-18 11:03:06 +02:00
parent a971a03446
commit ad01088725
3 changed files with 17 additions and 0 deletions

View file

@ -0,0 +1,8 @@
{{range $name, $taxonomy := .Site.Taxonomies.tags}} {{ $cnt := .Count }}
{{ with $.Site.GetPage (printf "/tags/%s" $name) }}
<div class="tagbutton">
<a href={{ .RelPermalink }} title="All pages with tag <i>{{$name}}</i>">{{$name}}</a>
<sup>{{$cnt}}</sup>
</div>
{{end}}
{{end}}

View file

@ -0,0 +1 @@
{{ len (where .Site.RegularPages "Section" "blog") }}

View file

@ -0,0 +1,8 @@
{{- $count := .Get 0 | default "5" -}}
<ul>
{{- range first (int $count) (sort (where .Site.RegularPages "Section" "blog") "Date" "desc") -}}
<li>
({{ .Date.Format "2006-01-02" }}) <a href="{{ .RelPermalink }}">{{ .Title }}</a>
</li>
{{- end -}}
</ul>