mirror of
https://github.com/McShelby/hugo-theme-relearn.git
synced 2024-11-23 15:57:57 +00:00
12 lines
No EOL
490 B
HTML
12 lines
No EOL
490 B
HTML
{{- $archetype := "default" }}
|
|
{{- if .page.Params.archetype }}
|
|
{{- $archetype = .page.Params.archetype }}
|
|
{{- else if .page.Params.chapter }}
|
|
{{- $archetype = "chapter-deprecated" }}
|
|
{{- else if .page.IsHome }}
|
|
{{- $archetype = "home-deprecated" }}
|
|
{{- end }}
|
|
{{- if not (fileExists (printf "/layouts/partials/archetypes/%s.html" $archetype)) }}
|
|
{{- $archetype = "default" }}
|
|
{{- end }}
|
|
{{- partial (printf "archetypes/%s.html" $archetype) (dict "page" .page "content" .content) }} |