Skip to content

Add search route templates and Pagefind hooks#19

Open
ritorhymes wants to merge 3 commits into
eips-wg:masterfrom
ritovision:search-template-hooks
Open

Add search route templates and Pagefind hooks#19
ritorhymes wants to merge 3 commits into
eips-wg:masterfrom
ritovision:search-template-hooks

Conversation

@ritorhymes

@ritorhymes ritorhymes commented May 18, 2026

Copy link
Copy Markdown

Built on top of the v2 multi-repo local build system #15.

Part of the Pagefind search rollout coordinated in eips-wg/preprocessor#39. This PR is the first theme PR in the search stack; the complete user-facing search experience requires #20, #21, #22, #23, and #24 on top of this foundation.

Description

Adds the theme-side foundation for the Pagefind search rollout without loading the browser search runtime yet.

Demo site: wg-eips.ritovision.com/search

  • Adds the generated /search/ route template, disabled-search fallback state, and per-page JSON config script that the later runtime reads as its primary search-state source.
  • Adds the fallback chain for search configuration: generated project data first, theme defaults for standalone rendering.
  • Adds a normal Search route link to desktop and mobile navigation so the route is reachable as soon as it exists.
  • Adds Pagefind indexing hooks to proposal pages, marking proposal prose as the indexed body and repeated page chrome as ignored.
  • Emits Pagefind filters, metadata, and sort keys needed by the later search runtime and full search UI.
  • Reads canonical proposal IDs from page.extra.proposal_id and updates theme fixtures so standalone rendering matches build-eips output.
  • Adds validation scripts for the search template fallback chain and rendered Pagefind indexing hooks.

This PR does not add the quick search runtime, full search controls, pagination, Created Date filtering, share links, last-search restore, or UI validation. Those land in the remaining stacked theme PRs.

Render external requires entries as direct links without forcing Zola to
resolve them as local pages.

This supports targeted --only rendering, where cross-repo proposal
dependencies can be rewritten to external URLs instead of local pages.

Move the theme demo homepage badges into front matter, a homepage_badges
macro, and theme-owned styles so the demo homepage stays
markdown-friendly.

Declare Zola 0.22.1 as the minimum supported version, enable bottom
footnotes, and update markdown highlighting to the class-based config
with github-light/dark themes and ABNF/CSL-JSON grammars.
Add POSIX and PowerShell setup scripts for theme contributors that
reuse or install build-eips, ensure a supported Zola is available, and
bootstrap the surrounding workspace through an active proposal repo.

Document the theme local development workflow, including workspace
layout, setup flags, serve versus preview, server/base URL settings,
targeted rendering, and source/output overrides.

Keep this focused on setup and documentation; theme rendering behavior
continues to be owned by the earlier theme PR.
Add the generated search route page and inert search state fallback
chain. The theme ships data/build_eips_search.toml with enabled = false
and a [extra.search] block in theme.toml. base.html prefers the project
data file when build-eips has written one and falls back to the
theme-level config for standalone theme consumption. The search route
renders the mount, embeds search state as JSON for later runtime code,
and shows a disabled-state message when search is off. No Pagefind
browser assets are loaded here.

Add the generated search route to the header navigation with a normal
text link so desktop and mobile navigation have the route as soon as the
route exists.

Add the Pagefind indexing contract on proposal rendering. Mark the
proposal article as the data-pagefind-body region and mark repeated
chrome as data-pagefind-ignore, so the index covers proposal prose
rather than taxonomy badges, preamble tables, the table of contents,
status callouts, links, citations, or other repeated UI. Emit Pagefind
filters for derived proposal_category, status, name-only authors, and
created_year; meta for proposal id, title, description, status, type,
category, author display strings, and created date; and sort keys for
number and created date.

Read the canonical proposal id from page.extra.proposal_id on rendered
proposal pages, and add proposal_id values to the committed theme
fixtures so standalone theme rendering produces the same ids that
build-eips will write.

Add two validation scripts. scripts/check-search-template covers the
fallback chain by building downstream Zola fixtures for missing project
data and project override cases. scripts/check-pagefind-indexing-hooks
runs real Pagefind against rendered output and asserts that /search/,
home, taxonomy pages, generic pages, and repeated chrome do not appear
in the index.
@ritorhymes ritorhymes force-pushed the search-template-hooks branch from ed25cbd to 90097e6 Compare May 19, 2026 02:44
@ritorhymes ritorhymes marked this pull request as ready for review May 20, 2026 23:34
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.

1 participant