Skip to content
This repository was archived by the owner on May 29, 2026. It is now read-only.

feat(docs): adopt @conduction/docusaurus-preset#137

Merged
rubenvdlinde merged 1 commit into
developmentfrom
chore/adopt-conduction-preset
May 7, 2026
Merged

feat(docs): adopt @conduction/docusaurus-preset#137
rubenvdlinde merged 1 commit into
developmentfrom
chore/adopt-conduction-preset

Conversation

@rubenvdlinde

Copy link
Copy Markdown
Contributor

Summary

  • Replace the inline `@docusaurus/preset-classic` configuration in docs/docusaurus.config.js with `createConfig()` from `@conduction/docusaurus-preset@^1.2.1`.
  • Adds the preset to docs/package.json (package-lock entry mirrors).
  • mydash-specific overrides preserved: en-only i18n, docs at `./`, blog disabled, prism + mermaid theme config, `onBrokenAnchors: 'warn'`, `trailingSlash: false`, the `onBrokenMarkdownImages` hook for the screenshot-driven tutorial pages.
  • Footer uses preset 1.2.0+'s per-property override: passes only `links` (filtered to the brand "Conduction" column) and inherits the brand `style: 'dark'` and KvK/BTW/IBAN copyright unchanged.
  • Re-includes the brand theme plugin in `themes:` alongside `@docusaurus/theme-mermaid` so the brand swizzles + brand.css auto-load aren't dropped.

Net effect

Once this merges and the documentation workflow deploys, mydash.conduction.nl picks up the Conduction brand chrome — cobalt navbar, dark footer panel with KvK/BTW anchor, Plex Mono captions, the brand colour palette mapped onto Docusaurus's Infima theme variables.

Mydash-specific Product / Support / etc. footer columns are intentionally not added in this PR — those will slot in next to the brand "Conduction" column in a follow-up once the link list is decided. The preset infrastructure is in place to accept them.

Why bumped to 1.2.1

While wiring this in, the build surfaced a packaging bug in the preset:
`src/css/tokens.css` imports the design-system monorepo's canonical
`tokens.css` and `typography.css` via three-up relative paths, which
only resolve inside the monorepo. Consumers installing via npm hit
`Can't resolve '../../../tokens.css'`. Fixed in design-system at
c8e3de7 by adding a `prepack` lifecycle script that bundles the canonical content into the preset before `npm publish`. The fix is live as `@conduction/docusaurus-preset@1.2.1`.

Test plan

Verified locally

  • `npm install --legacy-peer-deps` clean
  • `npm run build` passes (Server + Client compiled successfully, static files generated)

Replace the inline @docusaurus/preset-classic configuration with a
createConfig() call from @conduction/docusaurus-preset@^1.2.1. The
preset wraps the classic preset, registers the brand theme plugin
(navbar / footer swizzles + auto-loaded brand.css), and pre-applies
the cobalt + KNVB orange + Plex Mono brand defaults.

Mydash-specific overrides keep their previous behaviour:

- i18n: en-only (Dutch is still parked pending translation pass; the
  preset's nl/en/de/fr block is replaced wholesale)
- presets: docs.path: './' for the docs-at-root layout, blog disabled,
  customCss for the mydash-specific overrides
- themes: re-includes the brand theme plugin alongside theme-mermaid
  (createConfig replaces themes wholesale when an opt is passed)
- navbar: docSidebar entry + GitHub link + locale dropdown
- footer (preset 1.2.0+): per-property override — passes only `links`,
  filtered to the brand "Conduction" column. The brand `style: 'dark'`
  and the brand KvK/BTW/IBAN copyright string both inherit unchanged
- prism + mermaid theme config carry through themeConfig (shallow-
  merged into the preset's defaults)
- markdown.mermaid + markdown.hooks.onBrokenMarkdownImages
  + onBrokenAnchors + trailingSlash assigned post-createConfig because
  createConfig doesn't pass-through arbitrary top-level fields

Net effect: mydash.conduction.nl picks up the Conduction brand chrome
(cobalt navbar, dark footer panel with the KvK/BTW anchor, Plex Mono
captions) the next time the docs build deploys. Site-specific Product
and Support footer columns are intentionally not added — those will
slot in beside the brand "Conduction" column in a follow-up once we
decide which links go where.
@rubenvdlinde rubenvdlinde requested a review from Rem-Dam as a code owner May 7, 2026 08:37
@github-actions

github-actions Bot commented May 7, 2026

Copy link
Copy Markdown
Contributor

Quality Report — ConductionNL/mydash @ 23bdcda

Check PHP Vue Security License Tests
lint
phpcs
phpmd
psalm
phpstan
phpmetrics
eslint
stylelint
composer ✅ 100/100
npm ✅ 501/501
PHPUnit
Newman
Playwright ⏭️

Coverage: 90.7% (127/140 statements)


Quality workflow — 2026-05-07 08:40 UTC

Download the full PDF report from the workflow artifacts.

@rubenvdlinde rubenvdlinde merged commit 2741476 into development May 7, 2026
26 of 27 checks passed
@rubenvdlinde rubenvdlinde deleted the chore/adopt-conduction-preset branch May 7, 2026 10:12
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant