hugo-theme-relearn/layouts/partials/output-format.hugo
2022-11-17 22:12:18 +01:00

13 lines
No EOL
311 B
Text

{{- $page := . }}
{{- $format := "" }}
{{- if reflect.IsMap $page }}
{{- $format = $page.format }}
{{- $page = $page.page }}
{{- else }}
{{- $format = partial "get-format.hugo" $page }}
{{- end }}
{{- $ret := "default" }}
{{- if $format }}
{{ $ret = $format.Name | lower }}
{{- end }}
{{- return $ret }}