src/content/books/ with frontmatter that conforms to the book schema.
Schema Definition
The book schema is defined insrc/content/config.ts using Zod validation.
Fields
The title of the book.Example:
"The Wings of the Kirin"The author’s name.Example:
"Keigo Higashino"The year you read or finished the book as a number (not a date).Example:
2022Optional array of tags for categorizing books by genre, theme, or other characteristics.Example:
["Honkaku", "Mystery", "Japanese Fiction"]Example Book File
Here’s a complete example of a book MDX file:src/content/books/wings.mdx
Field Requirements
| Field | Type | Required | Default |
|---|---|---|---|
title | string | Yes | - |
author | string | Yes | - |
readYear | number | Yes | - |
tags | string[] | No | undefined |
Schema Differences
The books schema is unique compared to other content collections:- Uses
readYear(number) instead ofstartDate(date) - Includes an
authorfield, which is specific to books - Does not include
descriptionorimagefields - Simpler structure focused on book metadata
Year vs Date
Unlike projects, posts, and experiences that usestartDate (a date object), books use readYear as a simple number:
Usage Notes
- The
slugfield in frontmatter is used for routing but is not part of the schema validation readYearmust be a number without quotes (e.g.,2022, not"2022")- Tags are case-sensitive and will be displayed exactly as entered
- Common tag examples: genre names, reading challenges, book series, themes
- The MDX body content can include your review, notes, favorite quotes, or any other thoughts about the book
- Keep the content personal and authentic to reflect your reading experience