add back shortcodes from old blog-structure
This commit is contained in:
parent
a971a03446
commit
ad01088725
3 changed files with 17 additions and 0 deletions
8
layouts/shortcodes/liste-categories.html
Executable file
8
layouts/shortcodes/liste-categories.html
Executable 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}}
|
1
layouts/shortcodes/posts-compteur.html
Executable file
1
layouts/shortcodes/posts-compteur.html
Executable file
|
@ -0,0 +1 @@
|
|||
{{ len (where .Site.RegularPages "Section" "blog") }}
|
8
layouts/shortcodes/posts-recents.html
Executable file
8
layouts/shortcodes/posts-recents.html
Executable 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>
|
Loading…
Add table
Add a link
Reference in a new issue