feat(showcase): build the static gallery generator - #276
Conversation
Standalone Rust static-site generator that reads the example catalog from examples/README.md and each examples README.md, then generates a browsable HTML gallery with category/maturity filtering and one detail page per example. Includes CI workflow (.github/workflows/showcase.yml) that builds and runs the generator on pushes to examples/ or the generator itself. Part of salazarsebas#256
|
@Muyideen-js Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
|
Points 1-3 of #256 (index with category/maturity filters, client-side search, detail pages pulling |
|
This looks well-structured and doesn't conflict with anything else on main. Just ask that you rebase onto the latest main before we merge, to make sure nothing has drifted. |
Closes #256
Description
Build a static gallery generator that consumes the example catalog metadata and produces a browsable HTML showcase: an index page with category/maturity filtering and one detail page per example, each pulling its description from the example's own
README.md.Part of #256
Implementation approach
Decision: standalone Rust static-site generator (not an mdBook preprocessor).
The generator lives at
tools/cougr-showcase/as a workspace member. This approach was chosen because:mdBooksetup exists yet — building a preprocessor would require standing up an entiremdBookconfig and book structure before the generator could be testedWhat it does
examples/README.md, extracting both the Canonical and Transitional example tables (name, category, focus)README.md— extracts the first substantive paragraph as the descriptioncougr_featureslistindex.html— dark-themed gallery with search bar, category filter buttons, and maturity filter buttons (Stable/Beta/Experimental) with client-side JavaScript filtering{example}.html— one page per example showing name, category, maturity badge, description, cougr_features list, GitHub source link, and related examplesGallery index features
auto-fill, minmax(320px, 1fr))Detail page features
CI wiring
A new GitHub Actions workflow (
.github/workflows/showcase.yml) triggers on pushes and PRs touchingexamples/,tools/cougr-showcase/, or related config. It:cargo clippy -p cougr-showcase -- -D warningscargo build -p cougr-showcasecargo run -p cougr-showcase -- --output-dir site/showcaseindex.htmland at least one detail page existChanges
tools/cougr-showcase/Cargo.toml— New workspace tool crate (no dependencies,publish = false)tools/cougr-showcase/src/main.rs— Full generator implementation (~550 lines)tools/cougr-showcase/README.md— Usage documentation.github/workflows/showcase.yml— CI workflow for building and running the generatorCargo.toml— Added"tools/cougr-showcase"to workspace members.gitignore— Addedsite/showcase/for generated outputVerification
Out of scope