Publishing

Sample: Static search with Pagefind

Sample chapter in a second course about indexing prerendered HTML for search.

Sample

Sample. Replace the sample chapter files in src/content/knowledge/ with real course pages.

This chapter is sample content for a second Knowledge Hub course.

Why Pagefind

Pagefind indexes the HTML produced by astro build. There is no search API server.

Build flow

  1. Author MDX in Git
  2. Run npm run build
  3. Pagefind writes /pagefind/ into dist

Course structure

This file uses section: Publishing and sectionOrder: 2 so the Knowledge Hub index shows a second course beside Foundations.