Skip to content

docs: render live examples on the pages still using preview fences - #530

Merged
mrholek merged 1 commit into
mainfrom
docs/replace-preview-fences
Aug 3, 2026
Merged

docs: render live examples on the pages still using preview fences#530
mrholek merged 1 commit into
mainfrom
docs/replace-preview-fences

Conversation

@mrholek

@mrholek mrholek commented Aug 3, 2026

Copy link
Copy Markdown
Member

Seven pages still carried the pre-Astro ```jsx preview fences: components/footer, `components/icon`, `forms/form-control`, `forms/checks-radios`, `layout/grid`, `layout/columns` and `layout/gutters`. The docs engine has no handler for the `preview` meta, so all 60 examples rendered as plain code blocks with no demo above them.

Each snippet moved to an examples/*.tsx file mounted through <Example> with client:only="react" — the pattern every other page already uses. Markup, props and section order are unchanged; only the className on the fence moved to the <Example className> prop (dropping the docs-example m-0 border-0 part, which <Example> already applies itself).

Per page: footer 1, icon 3, form-control 8, checks-radios 17, gutters 6, columns 12, grid 13.

Verified with npm run docs:build plus a headless pass over the built site: every page renders the expected number of demo boxes, none of them empty, and no console errors.

Same change lands in coreui-react-pro (the pages are byte-identical there, so the files were copied 1:1 to keep future upstream merges conflict-free).

footer, icon, form control, checks & radios, grid, columns and gutters
still carried the pre-Astro ```jsx preview fences. The docs engine has no
handler for the `preview` meta, so all 60 of them rendered as code blocks
with no demo. Move each snippet to an `examples/*.tsx` file mounted through
<Example>, the pattern every other page already uses.
@mrholek
mrholek merged commit 857e2f5 into main Aug 3, 2026
5 checks passed
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