fix(term): allow controled by frontmatter

This commit is contained in:
ZhenShuo Leo
2025-09-14 12:35:49 +08:00
parent 019388def8
commit 7c4c740b25
2 changed files with 4 additions and 2 deletions

View File

@@ -1,6 +1,7 @@
{{ define "main" }}
{{ .Scratch.Set "scope" "term" }}
{{ if site.Params.term.showHero | default false }}
{{ $showHero := .Params.showHero | default site.Params.term.showHero | default false }}
{{ if $showHero }}
{{ $heroStyle := print "hero/" site.Params.term.heroStyle ".html" }}
{{ if templates.Exists ( printf "partials/%s" $heroStyle ) }}
{{ partial $heroStyle . }}

View File

@@ -1,6 +1,7 @@
{{ define "main" }}
{{ .Scratch.Set "scope" "list" }}
{{ if site.Params.taxonomy.showHero | default false }}
{{ $showHero := .Params.showHero | default site.Params.term.showHero | default false }}
{{ if $showHero }}
{{ $heroStyle := print "hero/" site.Params.taxonomy.heroStyle ".html" }}
{{ if templates.Exists ( printf "partials/%s" $heroStyle ) }}
{{ partial $heroStyle . }}