feat(site): link the React component demo from the docs site - #35
Merged
Merged
Conversation
The react-demo "Pixie" showcase was already deployed under demos/react-demo/ but nothing linked to it. Surface it from the docs site and make the production mount reproducible: - scripts/mount-demo.mjs + example:site:build:demos copy the built demo into the site dist (after the site build, which empties its own dist); deploy-docs.yml now calls the one script instead of inline bash. - landing layout gains a Demo nav link and a "See the live demo" hero CTA; index.md and the adding-stories guide link the demo too. - footer + "What it is" lede now state the docs site is itself built with Markbook. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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.
What & why
The
react-demo"Pixie" showcase — Markbook's Storybook-style dogfood — was already built and copied into the docs-site deploy, so it's live in production athttps://doidor.github.io/markbook/demos/react-demo/. But nothing on the docs site linked to it, so it was undiscoverable. This surfaces it from the front door and makes the production mount reproducible locally.Changes
Link the demo from the docs site (
examples/markbook-site/)layouts/landing.html— "Demo" top-nav link + a "See the live demo →" hero CTApages/index.md— a spotlight callout in "What it is" + a "See the live Pixie demo →" link on the "Component stories" feature cardpages/guides/adding-stories.md— opening blockquote linking the live demo as the guide's payoffAll links are relative (
./demos/react-demo/from the landing page,../demos/react-demo/fromguides/), matching Markbook'sbase: './'output.Reproducible production build (CI === local)
scripts/mount-demo.mjs— cross-platform copy ofreact-demo/dist→ sitedist/demos/react-demo/example:site:build:demosscript — builds the site, builds the demo, then mounts it (the copy must run last becausemarkbook buildempties its own dist via ViteemptyOutDir).github/workflows/deploy-docs.yml— three inline bash steps collapsed to onepnpm example:site:build:demosDogfooding note — footer + "What it is" lede now state the docs site is itself built with Markbook.
Verification
pnpm build+pnpm example:site:build:demosmount the demo; builtindex.htmlcarries 4./demos/react-demo/links,guides/adding-stories.htmlcarries the 1../demos/react-demo/linkcomponents/Avatar.html), its relative../assets/*.jsReact bundles, andpagefind/pagefind.jsall return 200pnpm lint(127 files) green; husky pre-commit ran the full suite (280 core + 22 cli tests) greenpackages/**source changed — examples + scripts + workflow + docs onlyCo-authored-by: Copilot 223556219+Copilot@users.noreply.github.com