Book

A single book object is injected into all template contexts regardless of the template's Context Mode.

Template Fields - Book

AttributeTypeDescription
bookdictionarybook object
book.titlestringtitle
book.authorstringauthor
book.tagslist[string]the book's tags
book.metadatadictionarymetadata
book.metadata.idstringunique id
book.metadata.last_openeddatetimedate last opened
book.slugsdictionaryslugs object
book.slugs.titlestringtitle slugified
book.slugs.authorstringauthor slugified
book.slugs.metadatadatetimeslugs metadata object
book.slugs.metadata.last_openeddatetimedate last opened slugified

Example Data - Book

{
  "title": "The Art Spirit",
  "author": "Robert Henri",
  "tags": ["#artist", "#being", "#inspiration"],
  "metadata": {
    "id": "1969AF0ECA8AE4965029A34316813924",
    "last_opened": "2021-11-02T18:27:04.781938076Z"
  },
  "slugs": {
    "title": "the-art-spirit",
    "author": "robert-henri"
  }
}

Example Template - Book

---
title: {{ book.title }}
author: {{ book.author }}
tags: {{ book.tags | join(sep=" ") }}
id: {{ book.metadata.id }}
last-opened: {{ book.metadata.last_opened | date(format="%Y-%m-%d-%H:%M") }}
---

Here Tera's date filter is used to format a datetime object into a human-readable date.