53 lines
2.2 KiB
HTML
53 lines
2.2 KiB
HTML
{{- /*
|
|
cite-book - Chicago Notes style book citation shortcode.
|
|
Renders a fully formatted Chicago Notes citation for a book, with optional
|
|
chapter, editor, edition, publisher, page range, ISBN (linked to Wikipedia
|
|
BookSources), original URL, and archived URL. All fields are optional except
|
|
author and title.
|
|
|
|
@param {string} author Author(s) in "Lastname, Firstname" format.
|
|
@param {string} chapter Chapter title, if citing a specific chapter.
|
|
@param {string} title Book title (rendered in italics).
|
|
@param {string} editor Editor(s) of the volume, if applicable.
|
|
@param {string} edition Edition (e.g. "3rd", "2nd").
|
|
@param {string} publisher Publisher name.
|
|
@param {string} year Publication year.
|
|
@param {string} page Page number (single) or start of range.
|
|
@param {string} page-end End of page range (if citing multiple pages).
|
|
@param {string} isbn ISBN (linked to Wikipedia BookSources).
|
|
@param {string} url Original URL of the resource.
|
|
@param {string} url-archived Archived version URL (e.g. Wayback Machine).
|
|
@param {string} url-archived-date Date of archival (e.g. "2024-01-15").
|
|
|
|
@example {{< cite-book
|
|
author="Patt, Yale N. and Patel, Sanjay J."
|
|
chapter="Appendix A: The LC-2 ISA"
|
|
title="Introduction to Computing Systems: from Bits and Gates to C and Beyond"
|
|
edition="1st"
|
|
publisher="McGraw-Hill"
|
|
year="2001"
|
|
page="429"
|
|
page-end="449"
|
|
isbn="978-0072376906"
|
|
url="http://www.mhhe.com/patt"
|
|
url-archived="https://web.archive.org/web/20170615060857/http://www.mhhe.com/engcs/compsci/patt/"
|
|
url-archived-date="June 15, 2017"
|
|
>}}
|
|
*/ -}}
|
|
|
|
{{ partial "cite-book.html" (dict
|
|
"author" (.Get "author")
|
|
"chapter" (.Get "chapter")
|
|
"title" (.Get "title")
|
|
"editor" (.Get "editor")
|
|
"edition" (.Get "edition")
|
|
"publisher" (.Get "publisher")
|
|
"year" (.Get "year")
|
|
"page" (.Get "page")
|
|
"pageEnd" (.Get "page-end")
|
|
"isbn" (.Get "isbn")
|
|
"url" (.Get "url")
|
|
"urlArchived" (.Get "url-archived")
|
|
"urlArchivedDate" (.Get "url-archived-date")
|
|
) }}
|