diff --git a/themes/42/layouts/_partials/asides/keywords.html b/themes/42/layouts/_partials/asides/keywords.html new file mode 100644 index 00000000..19ba7387 --- /dev/null +++ b/themes/42/layouts/_partials/asides/keywords.html @@ -0,0 +1,37 @@ +{{- $ctx := . -}} +{{- $scratch := newScratch -}} +{{- $scratch.Set "blocks" 0 -}} +{{- range $taxonomy, $_ := $ctx.Site.Taxonomies -}} + {{- with $ctx.Page.GetTerms $taxonomy -}} + {{- $scratch.Add "blocks" 1 -}} + {{- end -}} +{{- end -}} +{{- with $ctx.Params.keywords -}} + {{- if gt (len .) 0 -}} + {{- $scratch.Add "blocks" 1 -}} + {{- end -}} +{{- end -}} +{{- if gt ($scratch.Get "blocks") 0 }} + +{{- end }}