2022-07-15 12:07:48 +00:00
|
|
|
{{- $base := .base }}
|
|
|
|
{{- $page := .page }}
|
|
|
|
{{- $parameter := .parameter }}
|
2022-11-13 09:55:17 +00:00
|
|
|
{{- $outputFormat := .outputFormat }}
|
|
|
|
{{- if not $outputFormat }}
|
|
|
|
{{- $outputFormat = partial "output-format.hugo" $page }}
|
|
|
|
{{- end }}
|
2022-11-13 10:33:32 +00:00
|
|
|
{{- $suffix := partialCached "output-suffix.hugo" $page $page.RelPermalink $outputFormat }}
|
2022-11-12 22:39:48 +00:00
|
|
|
{{- $f := printf "/layouts/partials/%s.%s.%s" $base $outputFormat $suffix }}
|
|
|
|
{{- if or (not $outputFormat) (not (partialCached "fileExists.hugo" $f $f)) }}
|
2022-11-12 14:16:53 +00:00
|
|
|
{{- $f = printf "/layouts/partials/%s.%s" $base $suffix }}
|
|
|
|
{{- if partialCached "fileExists.hugo" $f $f }}
|
2022-07-15 12:07:48 +00:00
|
|
|
{{- partial (printf "%s.%s" $base $suffix) $parameter }}
|
|
|
|
{{- end }}
|
|
|
|
{{- else }}
|
2022-11-12 22:39:48 +00:00
|
|
|
{{- partial (printf "%s.%s.%s" $base $outputFormat $suffix) $parameter }}
|
2022-07-15 12:07:48 +00:00
|
|
|
{{- end }}
|