docs: migrate to the shared @coreui/astro-docs engine#486
Merged
Conversation
Replace the Gatsby-based docs site with the @coreui/astro-docs engine: Astro content collections, live component examples, generated API tables, and config-driven CDN/SRI placeholders.
- Declare the published packages the docs import (@coreui icons/utils/ internal-links/icon-react|vue/icons-pro/chart add-ons, react-imask, date-fns) and add the docs package version, so a plain yarn install builds the docs without the workspace yarn-link step (findSource reads base styling from the sibling library repo). - Resolve @coreui/chartjs via require.resolve so it survives dependency hoisting. - Drop the unused Gatsby remark plugin packages and dependency overrides, and the stale docs-old lint ignores.
The engine now supplies what was constant on every example: `lang` (the
edition default) everywhere, plus the vanilla `name`/`componentName` (filled by
remark-example-meta). Vanilla examples are now just `<Example code={…} />`.
The docs engine resolves the base SCSS from the @coreui/coreui package; it was only found via the dev-workspace sibling repo. Declaring it as a docs dependency lets findSource resolve it from node_modules, so a standalone clone builds the docs without the workspace layout.
…s scheme Old absolute links (coreui.io/docs/4.0/... and the version-less coreui.io/docs/...) pointed at a docs URL scheme that no longer exists. Repoint them to the current coreui.io/bootstrap/docs/... (where the shared utilities/layout/etc. live), and drop stray quote characters in a few URLs.
… choke on docs deps @astrojs/react@5 (a packages/docs dependency) requires Node >=22.12, which fails the install on the matrix's 20.x leg. The library itself doesn't use it, so skip the engine check during install and keep testing the lib on Node 20.
…nd API config Re-export the content collection and sandbox builder, and build api.config via the engine's createApiConfig(), instead of duplicating them locally. Bump @coreui/astro-docs to 0.1.0-beta.9 and @coreui/astro-docs-api-generator to 0.1.0-beta.1.
Move docs public images to public/assets (avatars and loose images to assets/img, brand to assets/brand) and update example references from /images/ to /assets/. Drop the stale public/ entry from .gitignore (a Gatsby leftover) so the docs assets are tracked like the other editions.
Delete the orphaned src/api-includes/*.api.mdx (superseded by src/api/*.json rendered via <Api>) and the empty src/pages directory, drop the one-off migration scripts, fix the stale "Gatsby-based" docs description in CLAUDE.md, and remove the redundant develop/dist script aliases (docs:dev now calls dev).
The third accordion item's body said "second item's accordion body"; relabel it to "third item's".
The @rollup/plugin-commonjs include was scoped to '../../node_modules/**' (hoisted root only), so a CJS-only dependency installed in the package's own node_modules was not transformed and its named exports could not be resolved. Match any node_modules path instead.
CButtonToolbar carried role="group", contradicting the page's own accessibility note (and the Bootstrap source) that toolbars should use role="toolbar".
The caption/dark examples repeated 'content for the first slide' on every slide; use second/third for slides 2 and 3.
The grid-cards intro said md cols: 1 'splitting four cards', but the example uses cols: 2; fix the prose to match.
The migration extracted the nesting/responsive examples with generic names (TableDemo0-6) and duplicated them as BootstrapDemo0-6 for the bootstrap page. Rename to semantic names (TableNestingExample, TableResponsive[Sm/Md/Lg/Xl/Xxl] Example) and have the bootstrap page reuse the same files; drop the duplicates.
- hoist IMaskMixin HOC out of render in input-mask examples (static-components) - replace irregular whitespace in button block example - relax cosmetic/false-positive rules for docs examples glob
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.
Migrates this repository's documentation from the Hugo site to the shared
@coreui/astro-docsAstroengine, so every CoreUI edition's docs build from one engine.
Highlights
@coreui/astro-docs(plus
@coreui/astro-docs-api-generatorfor the React/Vue API tables) and@coreui/internal-linksfor cross-framework links. A plainyarn install/CI builds the docs without any local workspace.
SCSS now provided by the engine.
codesource per example,edition-default language, customization snippets read from the engine via the
@docs/prefix, and colour/data-driven examples generated from data maps(theme colours, breakpoints) instead of hardcoded markup.
coreui.io/docs/4.0links repointed to the currentbootstrap/docsscheme, restoreddata-coreui-theme/docs-example-colsmodifiers, markdown (
.md/ llms) export fixes, and assorted markup repairs.No
dist/is committed; the docs build green.