mirror of
https://github.com/McShelby/hugo-theme-relearn.git
synced 2024-11-27 09:43:06 +00:00
15 lines
No EOL
598 B
HTML
15 lines
No EOL
598 B
HTML
{{- $hook := .hook }}
|
|
{{- $page := .page }}
|
|
{{- $parameter := .parameter }}
|
|
{{- $archetype := "default" }}
|
|
{{- if $page.Params.archetype }}
|
|
{{- $archetype = $page.Params.archetype }}
|
|
{{- else if $page.Params.chapter }}
|
|
{{- $archetype = "deprecated-chapter" }}
|
|
{{- else if $page.IsHome }}
|
|
{{- $archetype = "deprecated-home" }}
|
|
{{- end }}
|
|
{{- if not (fileExists (printf "/layouts/partials/archetypes/%s" $archetype)) }}
|
|
{{- $archetype = "default" }}
|
|
{{- end }}
|
|
{{- partial "output-partial.html" (dict "base" (printf "archetypes/%s/%s" $archetype $hook) "page" $page "parameter" $parameter) }} |