2022-07-15 14:07:48 +02:00
|
|
|
{{- $base := .base }}
|
|
|
|
{{- $page := .page }}
|
|
|
|
{{- $parameter := .parameter }}
|
|
|
|
{{- $format := partial "output-format.hugo" $page }}
|
|
|
|
{{- $suffix := partial "output-suffix.hugo" $page }}
|
2022-11-12 15:16:53 +01:00
|
|
|
{{- $f := printf "/layouts/partials/%s.%s.%s" $base $format $suffix }}
|
|
|
|
{{- if or (not $format) (not (partialCached "fileExists.hugo" $f $f)) }}
|
|
|
|
{{- $f = printf "/layouts/partials/%s.%s" $base $suffix }}
|
|
|
|
{{- if partialCached "fileExists.hugo" $f $f }}
|
2022-07-15 14:07:48 +02:00
|
|
|
{{- partial (printf "%s.%s" $base $suffix) $parameter }}
|
|
|
|
{{- end }}
|
|
|
|
{{- else }}
|
|
|
|
{{- partial (printf "%s.%s.%s" $base $format $suffix) $parameter }}
|
|
|
|
{{- end }}
|