docs/layouts/shortcodes/cite_book.html
Nicola Belluti 3df0d8d4d8
All checks were successful
Build and Publish / build (push) Successful in 41s
Added the cite_book template
2025-01-27 12:05:23 +01:00

33 lines
778 B
HTML

{{/*
A template for citing books inspired by the "cite book" template of Wikipedia.
<https://en.wikipedia.org/wiki/Template:Cite_book>
*/}}
<div style="display: inline">
{{/* Authors */}}
{{ with .Get "author" }}<b>{{ . }}</b>{{ end }}{{ with .Get "author2" }}; <b>{{ . }}</b>{{ end }}
{{/* Date */}}
{{ with .Get "date" }}({{ . }}).{{ end }}
{{/* Chapter */}}
{{ with .Get "chapter" }}"{{ . }}"{{ end }}
{{/* Title and edition */}}
{{ with .Get "title" }}in <i>{{ . }}</i>{{ end }}{{ with .Get "edition" }}({{ . }} ed.){{ end }}.
{{/* Publisher */}}
{{ with .Get "publisher" }}{{ . }}.{{ end }}
{{/* Pages */}}
{{ with .Get "page" }}p. {{ . }}.{{ end }}
{{ with .Get "pages" }}pp. {{ . }}.{{ end }}
{{/* ISBN */}}
{{ with .Get "isbn" }}ISBN {{ . }}.{{ end }}
</div>