Skip to content

docs: migrate to the shared @coreui/astro-docs engine#486

Merged
mrholek merged 35 commits into
mainfrom
feat/astro-docs
Jun 29, 2026
Merged

docs: migrate to the shared @coreui/astro-docs engine#486
mrholek merged 35 commits into
mainfrom
feat/astro-docs

Conversation

@mrholek

@mrholek mrholek commented Jun 24, 2026

Copy link
Copy Markdown
Member

Migrates this repository's documentation from the Hugo site to the shared
@coreui/astro-docs Astro
engine, so every CoreUI edition's docs build from one engine.

Highlights

  • Shared engine. Docs build on Astro via the published @coreui/astro-docs
    (plus @coreui/astro-docs-api-generator for the React/Vue API tables) and
    @coreui/internal-links for cross-framework links. A plain yarn install /
    CI builds the docs without any local workspace.
  • Old setup removed. Drops the Hugo config/build lock and the dead docs-site
    SCSS now provided by the engine.
  • Bootstrap-faithful examples. Single code source 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.
  • Review fixes. Stale coreui.io/docs / 4.0 links repointed to the current
    bootstrap/docs scheme, restored data-coreui-theme / docs-example-cols
    modifiers, markdown (.md / llms) export fixes, and assorted markup repairs.

No dist/ is committed; the docs build green.

Depends on the prerelease @coreui/astro-docs@0.1.0-beta.x while the engine
stabilises toward 0.1.0.

mrholek added 30 commits June 21, 2026 14:00
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.
mrholek added 5 commits June 29, 2026 01:00
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
@mrholek mrholek merged commit b3134c8 into main Jun 29, 2026
2 of 3 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