Library

Project Broadsheet's public-domain library. Host full-length works organized by chapter, with reader progress tracking, annotations, a floating table of contents, and chapter-by-chapter navigation.

Specialty Content Updated April 20, 2026 v1.0.0

The library is a dedicated content type for long-form works: public-domain books, serialized essays, and lengthy reports. It gives each work its own landing page, individual chapter pages, a floating table of contents, reading-progress persistence, per-chapter annotations, and chapter-to-chapter navigation that preserves the reader's place.

Folder layout

Each work lives in its own folder under src/library/works/{work-slug}/. The folder holds:

  • {work-slug}.json — work metadata (JSON data file picked up via Eleventy directory-data).
  • index.md (optional) — the work's landing page content.
  • One Markdown file per chapter (e.g. chapter-01.md, introduction.md, or section-01.md).

The chapter listing, subject pages, and author pages are all built from collections wired up in .eleventy.jslibraryChapters, libraryByWork, libraryWorks, and libraryFeatured.

Define a work

Drop a JSON file alongside the chapters with the work's metadata. Example, src/library/works/on-liberty/on-liberty.json:

{
  "workSlug": "on-liberty",
  "workTitle": "On Liberty",
  "author": "John Stuart Mill",
  "authorSlug": "john-stuart-mill",
  "authorDates": "1806–1873",
  "originalPublication": 1859,
  "originalLanguage": "English",
  "translator": null,
  "edition": "First edition, 1859",
  "source": "Project Gutenberg",
  "sourceUrl": "https://www.gutenberg.org/ebooks/34901",
  "type": "treatise",
  "subjects": ["Philosophy", "Politics", "Free Expression", "Ethics"],
  "difficulty": "Intermediate",
  "era": "19th Century",
  "shortWork": false
}

These fields flow into every chapter in the folder as shared front-matter context (that is what Eleventy directory data does), so individual chapter files stay short.

Add chapters

Chapters are Markdown files at src/library/works/{work-slug}/chapter-{nn}.md:

---
workSlug: on-liberty
chapterNumber: 2
title: "Of the Liberty of Thought and Discussion"
---

Chapter body in Markdown.
FieldRequiredNotes
workSlugYesMatches the workSlug in the folder's JSON
chapterNumberYesInteger used for ordering
titleYesChapter title
featuredNoPromotes this chapter into the libraryFeatured collection
parentWorkSlugNoUsed when a work is a sub-part of a larger collection (e.g. a lecture inside a lecture series)

The chapter template automatically adds prev/next navigation, a reading progress bar, footnote collection into the reader panel, highlights, bookmarks, and saves the reader's scroll position between visits.

Reader features on library pages

  • Floating table of contents. Jumps between chapters.
  • Reading progress bar. Persists per chapter in localStorage.
  • Annotations. Highlights, notes, and bookmarks per chapter, stored locally.
  • "Continue reading" button. On the work's landing page, jumps to the last chapter the reader opened.
  • Print CSS. Readers can print any chapter or the complete work.

Work landing page

Each work automatically gets a landing page at /library/{work-slug}/ with:

  • The work's metadata (author, year, subjects, difficulty).
  • A full chapter list.
  • Total reading time and percent completed for the current reader.
  • Related works by subject or author.

What to do next

  • Editions for numbered issues that group shorter articles.
  • Reviews for book, film, and podcast reviews.
  • Custom layouts if you want a different chapter template.
Still need help?

Browse Support for community channels and paid support options, or book a call if you'd like me to set it up for you.