Skip to content

perf(web): statically compile chapter full-text rollups during build - #284

Merged
williamzujkowski merged 1 commit into
mainfrom
perf/static-chapter-rollups
Oct 6, 2026
Merged

williamzujkowski merged 1 commit into
mainfrom
perf/static-chapter-rollups

Conversation

@williamzujkowski

Copy link
Copy Markdown
Collaborator

Description

Statically pre-renders all section contents within chapter rollups at build time using Astro SSG, replacing client-side sequential fetch() and DOMParser waterfalls for large chapters (>50 sections).

Key Improvements

  • Zero Client Network Waterfalls: When reading full chapter text, all articles are already compiled into the static document, eliminating 50+ network requests on mobile/slow connections.
  • Instant Toggling: Toggling between 'Sections in this chapter' and 'Read full chapter' is instantaneous (0ms) and entirely client-side without spinners or parsing delays.
  • Pagefind Search Indexing: Static compilation ensures Pagefind search indexes full chapter texts alongside section-level pages.
  • Deep-linking & Jump Anchors: Retains #section-{id} anchor linking, auto-expanding the chapter text when loaded with a section hash.
  • Cross-Reference Auto-linking: Automatically links section citations (e.g. section 102) across all rendered chapter articles.

Closes #279

Pre-render full chapter content at build time via Astro SSG, eliminating client-side DOMParser network waterfalls for large chapters while preserving instant toggles and deep links.

Closes #279
@williamzujkowski
williamzujkowski requested a review from a team as a code owner October 6, 2026 15:01
@williamzujkowski
williamzujkowski merged commit f33a757 into main Oct 6, 2026
5 checks passed
@williamzujkowski
williamzujkowski deleted the perf/static-chapter-rollups branch October 6, 2026 15:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

perf(web): statically compile chapter full-text rollups during build

1 participant