[skip ci] Added the cite_introduction_to_computing_systems shortcode

This commit is contained in:
2025-01-29 10:58:05 +01:00
parent 3df0d8d4d8
commit 55c5d52e5a
3 changed files with 110 additions and 25 deletions

View File

@ -0,0 +1,53 @@
{{/*
Use the `cite_book` shortcode for "Introduction to Computing Systems"
specifically
### Example
```md
{{< cite_introduction_to_computing_systems
edition = "1"
chapter = "1.2 How We Will Get There"
pages = "2-6"
>}}
```
*/}}
{{ $title := "" }}
{{ $edition := "" }}
{{ $date := "" }}
{{ $isbn := "" }}
{{ if eq (.Get "edition") "1" }}
{{ $edition = "1" }}
{{ $title = "Introduction to Computing Systems from Bits & Gates to C & Beyond" }}
{{ $date = "2001" }}
{{ $isbn = "9780072376906" }}
{{ else if eq (.Get "edition") "2" }}
{{ $edition = "2" }}
{{ $title = "Introduction to Computing Systems from Bits & Gates to C & Beyond" }}
{{ $date = "2004" }}
{{ $isbn = "9780072467505" }}
{{ else }}
{{ $edition = "3" }}
{{ $title = "Introduction to Computing Systems from Bits & Gates to C/C++ & Beyond" }}
{{ $date = "2019" }}
{{ $isbn = "9781260150537" }}
{{ end }}
{{ partial "cite_book.html" (dict
"chapter" (.Get "chapter")
"page" (.Get "page")
"pages" (.Get "pages")
"edition" $edition
"title" $title
"date" $date
"isbn" $isbn
"publisher" "McGraw-Hill Higher Education"
"author" "Patt, Yale N."
"author2" "Patel, Sanjay J."
) }}