2022-07-09 08:37:39 +00:00
|
|
|
{{- $hook := .hook }}
|
|
|
|
{{- $page := .page }}
|
|
|
|
{{- $parameter := .parameter }}
|
2022-07-05 22:15:33 +00:00
|
|
|
{{- $archetype := "default" }}
|
2022-07-09 08:37:39 +00:00
|
|
|
{{- if $page.Params.archetype }}
|
|
|
|
{{- $archetype = $page.Params.archetype }}
|
|
|
|
{{- else if $page.Params.chapter }}
|
2022-07-05 22:15:33 +00:00
|
|
|
{{- $archetype = "deprecated-chapter" }}
|
2022-07-09 08:37:39 +00:00
|
|
|
{{- else if $page.IsHome }}
|
2022-07-05 22:15:33 +00:00
|
|
|
{{- $archetype = "deprecated-home" }}
|
|
|
|
{{- end }}
|
|
|
|
{{- if not (fileExists (printf "/layouts/partials/archetypes/%s" $archetype)) }}
|
|
|
|
{{- $archetype = "default" }}
|
|
|
|
{{- end }}
|
2022-07-15 12:07:48 +00:00
|
|
|
{{- partial "output-partial.hugo" (dict "base" (printf "archetypes/%s/%s" $archetype $hook) "page" $page "parameter" $parameter) }}
|