mirror of
https://github.com/McShelby/hugo-theme-relearn.git
synced 2024-11-23 15:57:57 +00:00
15 lines
No EOL
598 B
Text
15 lines
No EOL
598 B
Text
{{- $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.hugo" (dict "base" (printf "archetypes/%s/%s" $archetype $hook) "page" $page "parameter" $parameter) }} |