Added the cite_book template
All checks were successful
Build and Publish / build (push) Successful in 41s

This commit is contained in:
Nicola Belluti 2025-01-27 12:05:23 +01:00
parent 0ae6028c18
commit 3df0d8d4d8
2 changed files with 33 additions and 1 deletions

View File

@ -8,7 +8,7 @@ breadcrumbs = false
{{< card link="introduction" title="Introduction" icon="book-open" >}}
{{< /cards >}}
### CPUs
### ISAs
{{< cards >}}
{{< card link="lc-2" title="LC-2" icon="chip" >}}

View File

@ -0,0 +1,32 @@
{{/*
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>