mirror of
https://github.com/McShelby/hugo-theme-relearn.git
synced 2024-11-27 01:33:04 +00:00
theme: cache output-suffix #380
This commit is contained in:
parent
a425a0680c
commit
dbb37a29a8
1 changed files with 5 additions and 5 deletions
|
@ -1,14 +1,14 @@
|
||||||
{{- $base := .base }}
|
{{- $base := .base }}
|
||||||
{{- $page := .page }}
|
{{- $page := .page }}
|
||||||
{{- $parameter := .parameter }}
|
{{- $parameter := .parameter }}
|
||||||
{{- $format := partial "output-format.hugo" $page }}
|
{{- $outputFormat := partial "output-format.hugo" $page }}
|
||||||
{{- $suffix := partial "output-suffix.hugo" $page }}
|
{{- $suffix := partialCached "output-suffix.hugo" $page $page $outputFormat }}
|
||||||
{{- $f := printf "/layouts/partials/%s.%s.%s" $base $format $suffix }}
|
{{- $f := printf "/layouts/partials/%s.%s.%s" $base $outputFormat $suffix }}
|
||||||
{{- if or (not $format) (not (partialCached "fileExists.hugo" $f $f)) }}
|
{{- if or (not $outputFormat) (not (partialCached "fileExists.hugo" $f $f)) }}
|
||||||
{{- $f = printf "/layouts/partials/%s.%s" $base $suffix }}
|
{{- $f = printf "/layouts/partials/%s.%s" $base $suffix }}
|
||||||
{{- if partialCached "fileExists.hugo" $f $f }}
|
{{- if partialCached "fileExists.hugo" $f $f }}
|
||||||
{{- partial (printf "%s.%s" $base $suffix) $parameter }}
|
{{- partial (printf "%s.%s" $base $suffix) $parameter }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- else }}
|
{{- else }}
|
||||||
{{- partial (printf "%s.%s.%s" $base $format $suffix) $parameter }}
|
{{- partial (printf "%s.%s.%s" $base $outputFormat $suffix) $parameter }}
|
||||||
{{- end }}
|
{{- end }}
|
Loading…
Reference in a new issue