Omphaloskepsis-2/layouts/shortcodes/cite.html

12 lines
428 B
HTML
Raw Normal View History

2023-10-03 12:08:35 +00:00
{{- if .Params.title -}}
{{- if not $.Params.cite -}}
{{- erroridf "missing-cite" "No cite found for citation '%q' (%q)" .Params.title .Page.File.Path -}}
{{- end -}}
{{- else -}}
{{- errorf "No title found for citation (%q)" .Page.File.Path -}}
{{- end -}}
{{- $citeID := cond ( .Params.cite | not | not ) .Params.cite .Params.title -}}
{{- /**/ -}}{{- partialCached "cite.html" . $citeID -}}{{- /**/ -}}