Add search route templates and Pagefind hooks#19
Open
ritorhymes wants to merge 3 commits into
Open
Conversation
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.
82e2b7f to
ed25cbd
Compare
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.
ed25cbd to
90097e6
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
/search/route template, disabled-search fallback state, and per-page JSON config script that the later runtime reads as its primary search-state source.page.extra.proposal_idand updates theme fixtures so standalone rendering matches build-eips output.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.