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 }}
|
2022-11-12 14:16:53 +00:00
|
|
|
{{- $f := printf "/layouts/partials/archetypes/%s" $archetype }}
|
|
|
|
{{- if not (partialCached "fileExists.hugo" $f $f) }}
|
2022-07-05 22:15:33 +00:00
|
|
|
{{- $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) }}
|