Add structured markup data#26
Open
ritorhymes wants to merge 12 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.
Render configured taxonomy descriptions on taxonomy list and term pages. Store the text beside the existing taxonomy metadata in config/zola.toml so future taxonomy terms can add page copy without changing the templates. Keep badge tooltip text unchanged. The new descriptions are visible page intro text and can provide more detail than hover tooltips.
Render the generated hardfork index at /hardforks/ and add a Network Upgrade row to proposal pages when the preprocessor provides membership metadata. Keep the hardfork page summary in the active Zola config under section_descriptions so the template does not hardcode page copy. Use the generated URLs from front matter directly so targeted builds can link omitted proposals to their public pages without template lookups. Add focused styles, navigation, and demo fixture content for populated and empty hardfork entries.
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.
Replace the old Fuse search runtime with Pagefind-backed browser search. Add a loader module as the single Pagefind API boundary. The loader imports the configured Pagefind bundle, sets basePath, baseUrl, and excerptLength, initializes once, and serves both search surfaces. Split the prior monolithic search.mjs into focused modules for config, constants, DOM helpers, loading, modal search, full-page search, and result rendering. Rebuild the quick search modal against the new loader with the final keyword/phrase copy and modal layout. Wire the full search page runtime shell with query state, the relevance/number/created sort contract, a status region, a results region, and the final share-link icon button. The share button keeps copy success or failure feedback on the icon state instead of rewriting the result status text. Update base.html to expose resolved search state as a JSON config script for client JavaScript, make the global header search trigger a real /search/ link, and load search UI styles from a dedicated stylesheet instead of injecting them from JavaScript after startup. Add check-pagefind-search-ui coverage for the loader boundary, quick search modal, share icon state, and full search runtime shell against rendered output.
Add Pagefind-backed filter controls on top of the runtime core. Read available filter values from Pagefind and render draft-driven dropdowns for Proposal Category, Status, and Author. Establish the draft, staged, and committed state model for full search. Dropdown edits are staged while a dropdown is open. Query and filter edits update draft UI state. Search or Enter commits the draft query and filters together, updates the URL, and runs Pagefind. Dropdown Apply, outside click, chip removal, clear-field actions, and author mode changes update draft state only. Empty searches clear to the clean search route without calling Pagefind. Sort continues to commit on change against committed state. Use the rendered proposal filter contract introduced by the template hook foundation: proposal_category, status, and author. Encode Proposal Category with URL parameter proposalCategory and Pagefind field proposal_category. Keep Pagefind import, filter loading, and search execution behind loader.mjs. Render disabled loading filter shells in the template so the filter layout is present before JavaScript hydrates it. Add dropdown overlay, chevron, chip, result-hover, and loading-state styles with validation coverage for the URL/state contract and Pagefind filter queries.
Add the Created Date range filter on top of the generic full-search filter controls. Expose createdFrom and createdTo URL parameters, normalize invalid or reversed year ranges, and expand committed ranges into inclusive Pagefind created_year OR filters. Keep same-year selections encoded as a single starting year. Render the Created Date control as a Year selector plus a disabled To selector that unlocks after Year is selected. Display a single range chip for the committed years and keep clear/remove actions in draft state until Search or Enter commits. Add stylesheet and validation coverage for the Created Date control, loading shell, URL normalization, and Pagefind year filter expansion.
Add result pagination on top of the filter UI. Pagination commits on change, like sort, and shares the same URL-backed committed state. Track the current page as a page URL parameter and normalize out-of-range values against the active result count. Slice cached Pagefind results to the current page, so paging does not rerun Pagefind; only sort, query, or filter commits do. A new query, filter, or sort commit resets the page to 1. Add the pagination control module, page markup, scroll controls, compact page status, responsive styles, and validation coverage. Query and filter edits continue to ride the explicit Search or Enter commit path.
Add the 24-hour last-search URL restore convenience on top of the completed search UI. Store only the canonical generated search-route URL in a versioned localStorage envelope, expire it after 24 hours, and restore it with replaceState only when the current search URL has no active criteria. Harden the UI validation script around storage isolation, URL normalization, restore eligibility, and the search browser contract.
Add shared JSON-LD includes for sitewide WebSite data, navigation, breadcrumbs, collection pages, and the search page. Emit sitewide schema outside extra_head so page-specific template overrides do not remove it. Move the existing EIP Article JSON-LD into a structured-markup include without changing its field contract, then add breadcrumbs for EIP, taxonomy, hardfork, and search pages. Add a structured-markup validation script that renders representative pages, parses every JSON-LD block, and checks the expected schema types for home, EIP, taxonomy, hardfork, and search output.
4feb36d to
b9fa93c
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.
Closes #4
Summary
Adds JSON-LD structured markup data for the completed theme page surfaces.
WebSitestructured markup data outsideextra_headso page-specific template overrides do not remove it.ArticleJSON-LD into a structured-markup include for consistency without changing its field contract.CollectionPagestructured markup data for taxonomy and hardfork listing pages.WebPagestructured markup data for the search page, with search behavior represented through the sitewideSearchAction.BreadcrumbListstructured markup data for EIP, taxonomy, hardfork, and search pages.@typecoverage. It does not attempt full schema.org semantic validation.