page.cavu.blocks.toc

cavu.page

Documentation

A table-of-contents block, modeled on the EPUB 3 navigation document: simultaneously machine-parseable navigation and rendered content. Designed to sit inside a pub.leaflet.pages.linearDocument (or canvas) open block union in the book's frontmatter document; renderers that don't recognize it skip it — the document's textContent should carry a plaintext TOC for previews and search. Book readers parse it for navigation UI and render it as a page in the reading flow.

main object

A table-of-contents block, modeled on the EPUB 3 navigation document: simultaneously machine-parseable navigation and rendered content. Designed to sit inside a pub.leaflet.pages.linearDocument (or canvas) open block union in the book's frontmatter document; renderers that don't recognize it skip it — the document's textContent should carry a plaintext TOC for previews and search. Book readers parse it for navigation UI and render it as a page in the reading flow.

Properties

entries array of ref#entry Required

Flat list in reading order; `depth` reconstructs the tree. Leaf entries are chapters and must carry a target document; grouping entries (parts, volumes) may omit it.

maxLength: 10000 items
View raw schema
{
  "type": "object",
  "required": [
    "entries"
  ],
  "properties": {
    "entries": {
      "type": "array",
      "items": {
        "ref": "#entry",
        "type": "ref"
      },
      "maxLength": 10000,
      "description": "Flat list in reading order; `depth` reconstructs the tree. Leaf entries are chapters and must carry a target document; grouping entries (parts, volumes) may omit it."
    }
  },
  "description": "A table-of-contents block, modeled on the EPUB 3 navigation document: simultaneously machine-parseable navigation and rendered content. Designed to sit inside a pub.leaflet.pages.linearDocument (or canvas) open block union in the book's frontmatter document; renderers that don't recognize it skip it — the document's textContent should carry a plaintext TOC for previews and search. Book readers parse it for navigation UI and render it as a page in the reading flow."
}
entry object

No description available.

Properties

block string Optional

Optional anchor finer than a page, for entries that begin mid-page: a pub.leaflet.richtext.facet#id anchor within the target page. Rarely needed once chapters are pages.

maxLength: 1000 bytes
depth integer Optional

Nesting depth. A flat depth-annotated list reconstructs any tree in one pass.

minimum: 0
document string at-uri Optional

Spine document where this entry begins. Required on leaf (chapter) entries; app-level validation enforces this.

page string Optional

Page id within the target document — the id of a pub.leaflet.pages.linearDocument (or canvas) page, or a page.cavu.pages page id in comic chunks. Chapters are pages, so leaf entries carry this unless the chapter is the document's only content page. Pages targeted by leaf entries are chapters in the reading flow and receive chapter-opening treatment; untargeted pages are auxiliary (e.g. a release nav page).

maxLength: 1000 bytes
title string Required

Display title of this entry (e.g. 'Chapter 2. The Mermaid's Lullaby' or 'Part II').

maxLength: 5000 bytesmaxGraphemes: 500 graphemes
View raw schema
{
  "type": "object",
  "required": [
    "title"
  ],
  "properties": {
    "page": {
      "type": "string",
      "maxLength": 1000,
      "description": "Page id within the target document — the id of a pub.leaflet.pages.linearDocument (or canvas) page, or a page.cavu.pages page id in comic chunks. Chapters are pages, so leaf entries carry this unless the chapter is the document's only content page. Pages targeted by leaf entries are chapters in the reading flow and receive chapter-opening treatment; untargeted pages are auxiliary (e.g. a release nav page)."
    },
    "block": {
      "type": "string",
      "maxLength": 1000,
      "description": "Optional anchor finer than a page, for entries that begin mid-page: a pub.leaflet.richtext.facet#id anchor within the target page. Rarely needed once chapters are pages."
    },
    "depth": {
      "type": "integer",
      "default": 0,
      "minimum": 0,
      "description": "Nesting depth. A flat depth-annotated list reconstructs any tree in one pass."
    },
    "title": {
      "type": "string",
      "maxLength": 5000,
      "description": "Display title of this entry (e.g. 'Chapter 2. The Mermaid's Lullaby' or 'Part II').",
      "maxGraphemes": 500
    },
    "document": {
      "type": "string",
      "format": "at-uri",
      "description": "Spine document where this entry begins. Required on leaf (chapter) entries; app-level validation enforces this."
    }
  }
}

Lexicon Garden

@