mirror of
https://github.com/McShelby/hugo-theme-relearn.git
synced 2024-11-24 00:03:10 +00:00
d2d7d808a0
because achretypes caching was unreliable when the whole page was used; Hugo bug or is it just me?
17 lines
No EOL
744 B
Text
17 lines
No EOL
744 B
Text
{{- $base := .base }}
|
|
{{- $page := .page }}
|
|
{{- $parameter := .parameter }}
|
|
{{- $outputFormat := .outputFormat }}
|
|
{{- if not $outputFormat }}
|
|
{{- $outputFormat = partial "output-format.hugo" $page }}
|
|
{{- end }}
|
|
{{- $suffix := partialCached "output-suffix.hugo" $page $page.RelPermalink $outputFormat }}
|
|
{{- $f := printf "/layouts/partials/%s.%s.%s" $base $outputFormat $suffix }}
|
|
{{- if or (not $outputFormat) (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 $outputFormat $suffix) $parameter }}
|
|
{{- end }} |