diff --git a/layouts/partials/social.html b/layouts/partials/social.html index a632505..43bfbb1 100644 --- a/layouts/partials/social.html +++ b/layouts/partials/social.html @@ -236,6 +236,45 @@ {{ end }} + {{ if isset .Site.Params "email" }} + + + + + + {{ end }} + + {{ if isset .Site.Params "gitea" }} + + + + + + {{ end }} + + + + + + + + + + + + + + + + + + + diff --git a/layouts/shortcodes/archive.html b/layouts/shortcodes/archive.html new file mode 100644 index 0000000..32badb4 --- /dev/null +++ b/layouts/shortcodes/archive.html @@ -0,0 +1,20 @@ +{{/* + +simple shortcode to display all posts in yearly sections on your archive page +by Charl P. Botha + +this is a much simplified version of the yearly post archiving template at: +https://rohanverma.net/blog/2019/11/15/archive-pages-group-by-year-hugo/ + +*/}} + +{{ $prev := 3000}} +{{range where .Site.RegularPages "Section" "posts"}} +{{if .Date}} +{{if gt $prev (.Date.Format "2006")}} +## {{ .Date.Format "2006" }} +{{end}} +{{.Date.Format "02 Jan"}} -- [{{.Title}}]({{.Permalink}}) +{{ $prev = .Date.Format "2006"}} +{{end}} +{{end}}