Omphaloskepsis-2/layouts/shortcodes/cite.html
2023-10-03 13:08:35 +01:00

11 lines
428 B
HTML

{{- 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 -}}{{- /**/ -}}