{{- $hook := .hook }} {{- $page := .page }} {{- $parameter := .parameter }} {{- $outputFormat := .outputFormat }} {{- if not $outputFormat }} {{- $outputFormat = partial "output-format.hugo" $page }} {{- end }} {{- $archetype := "default" }} {{- if not $page.File }} {{- else if $page.Params.archetype }} {{- $archetype = $page.Params.archetype }} {{- else if $page.Params.chapter }} {{- $archetype = "chapter" }} {{- if findRE `(?s)