mirror of
https://github.com/McShelby/hugo-theme-relearn.git
synced 2024-11-27 09:43:06 +00:00
10 lines
No EOL
505 B
HTML
10 lines
No EOL
505 B
HTML
{{- $base := .base }}
|
|
{{- $page := .page }}
|
|
{{- $parameter := .parameter }}
|
|
{{- if or (not (partial "output-format.html" $page)) (not (fileExists (printf "/layouts/partials/%s.%s.html" $base ((partial "output-format.html" $page) | lower)))) }}
|
|
{{- if (fileExists (printf "/layouts/partials/%s.html" $base)) }}
|
|
{{- partial (printf "%s.html" $base) $parameter }}
|
|
{{- end }}
|
|
{{- else }}
|
|
{{- partial (printf "%s.%s.html" $base ((partial "output-format.html" $page) | lower)) $parameter }}
|
|
{{- end }} |