Book reader (EPUB)

Embed the portfolio EPUB reader in docs; it loads book.epub from static files built from repo-root books/.

Book reader (EPUB)

The portfolio serves built books from static files at /books/<slug>/book.epub. These are produced by the root-level script pnpm run build:books from the repo-root books/ directory. The in-app reader loads book.epub and uses the same EPUB runtime on the dedicated book reader page and in embedded docs.

Embedded reader in docs

The BookReaderEmbed component can be used in any doc or article to show the same reader used on the book reader page, loading a specific book by slug from the static EPUB URL.

Example:

How it works

  • EPUB: built from books/<slug>/chapters/ and written to apps/portfolio/public/books/<slug>/book.epub
  • Manifest: build:books writes public/books/manifest.json, which powers the books list and getBooks()
  • Runtime: the reader fetches /books/<slug>/book.epub and renders it in-browser without server-side book rendering

Planning records

Books planning and operating records live directly in the books docs section:

For contributor loops and fixes, update these books docs first so the live section documentation stays aligned with the actual reader behavior and publishing pipeline.