mirror of
https://github.com/McShelby/hugo-theme-relearn.git
synced 2024-11-27 09:43:06 +00:00
14 lines
No EOL
603 B
Text
14 lines
No EOL
603 B
Text
{{- $base := .base }}
|
|
{{- $page := .page }}
|
|
{{- $parameter := .parameter }}
|
|
{{- $format := partial "output-format.hugo" $page }}
|
|
{{- $suffix := partial "output-suffix.hugo" $page }}
|
|
{{- $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 }}
|
|
{{- partial (printf "%s.%s" $base $suffix) $parameter }}
|
|
{{- end }}
|
|
{{- else }}
|
|
{{- partial (printf "%s.%s.%s" $base $format $suffix) $parameter }}
|
|
{{- end }} |