Taxonomy add hero image

This commit is contained in:
Nuno Coração
2022-12-12 22:58:42 +00:00
parent 6fd8de1edc
commit 07055a2934
4 changed files with 18 additions and 8 deletions

View File

@@ -1,4 +1,18 @@
{{ define "main" }}
{{ .Scratch.Set "scope" "list" }}
{{ if .Site.Params.taxonomy.showHero | default false }}
{{ $heroStyle := print "partials/hero/" .Site.Params.taxonomy.heroStyle ".html" }}
{{ if templates.Exists $heroStyle }}
{{ partial $heroStyle . }}
{{ else }}
{{ partial "partials/hero/basic.html" . }}
{{ end }}
{{- end -}}
{{ $toc := and (.Params.showTableOfContents | default (.Site.Params.taxonomy.showTableOfContents | default false)) (in
.TableOfContents "<ul") }}
<header>
{{ if .Params.showBreadcrumbs | default (.Site.Params.taxonomy.showBreadcrumbs | default false) }}
{{ partial "breadcrumbs.html" . }}