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