Skip to content

Redesign docs site to match sibling opencdd.github.io design - #22

Merged
ronaldtse merged 2 commits into
mainfrom
docs/redesign-matching-sibling
Jul 25, 2026
Merged

Redesign docs site to match sibling opencdd.github.io design#22
ronaldtse merged 2 commits into
mainfrom
docs/redesign-matching-sibling

Conversation

@ronaldtse

Copy link
Copy Markdown
Contributor

Summary

Replaces the Starlight-based docs with the design system used by
the sibling browser site at https://opencdd.github.io/. Same color
palette, typography, and layout — adapted for a docs-only deployment.

Design system ported

  • src/styles/global.css — the Tailwind v4 @theme block with the
    full OpenCDD palette (paper, ink, clay, teal, lapis, hex, coral)
    in light + dark + manual override variants. Copied verbatim.
  • src/components/ui/SkipToContent.astro, Card.astro — direct ports.
  • src/components/layout/Header.astro — simplified (drops command
    palette, dictionary nav, mobile nav, theme toggle). Docs nav: Home,
    Docs, GitHub, OpenCDD Browser.
  • src/components/layout/Footer.astro — simplified footer with
    Project / Elsewhere nav.
  • src/layouts/BaseLayout.astro, ProseLayout.astro, DocsLayout.astro
    — sidebar-aware docs layouts.
  • src/lib/cn.ts — classname joiner.
  • public/img/opencdd-logo_{light,dark}.svg + favicons + webmanifest.

Astro setup migrated from Starlight → vanilla Astro + Vue + MDX

  • Dropped @astrojs/starlight, @astrojs/starlight-tailwind,
    @astrojs/tailwind (Tailwind v3 adapter).
  • Added @astrojs/vue, @astrojs/mdx, @tailwindcss/vite (Tailwind v4
    via Vite plugin), vue, tailwindcss@^4.
  • astro.config.mjs mirrors the sibling config: vue() + mdx() integrations,
    tailwindcss() Vite plugin.
  • tsconfig.json adds ~ / ~/* path alias for src/.

Content collection restructured

  • src/content.config.ts (Astro 5 path) replaces src/content/config.ts
    (Starlight path). Schema: title, description, published, updated,
    order, section, tags — matches the sibling's docs schema.
  • All 10 existing markdown pages converted: added published: 2026-07-25
    • section + order. Bodies unchanged except stripping the duplicated
      # Title h1 (now provided by DocsLayout's header).
  • Removed index.mdx (Starlight splash page); replaced with custom
    src/pages/index.astro hero.

New pages

  • src/pages/index.astro — home page with hero, "What is opencdd?" cards,
    Ruby code sample, install snippet. Mirrors the sibling's hero styling.
  • src/pages/docs/index.astro — docs landing page grouping entries by
    section with colored Card containers.
  • src/pages/docs/[...slug].astro — dynamic per-doc route with sidebar
    nav and "Edit this page on GitHub" link.

Inert legacy files left in place

  • src/styles/custom.css (Starlight CSS overrides) — kept per the
    "never delete source" rule; no longer loaded.
  • src/assets/logo.svg — kept; superseded by public/img/.

Test plan

  • Local: npm run build — 12 pages generated cleanly
  • Local: npm run preview — home, docs index, docs/getting-started/,
    docs/ontology/ all render with design tokens (paper-50 backgrounds,
    ink-900 text, hex-600 accents)
  • Each doc page has exactly one h1 (was previously duplicated)
  • CI: docs workflow builds + deploys to Pages

Replaces Starlight with the design system used by the sibling browser
project at https://opencdd.github.io/ - same Tailwind v4 @theme palette
(paper, ink, clay, teal, lapis, hex, coral), same prose-opencdd
typography, same Header/Footer/BaseLayout/ProseLayout/DocsLayout
structure. Adapted for docs-only deployment by dropping the
browser-specific CommandPalette, dictionary nav, ThemeToggle, mobile
nav, and decorative animations.

Design system ported:
- src/styles/global.css copied verbatim (780 lines, both light + dark
  palettes plus manual override)
- Header.astro, Footer.astro, Card.astro, SkipToContent.astro ported
  and slimmed to docs-only scope
- BaseLayout, ProseLayout, DocsLayout chained: Base provides Header +
  Footer + main; Prose adds max-w + prose styling; Docs adds sidebar
- cn.ts classname helper
- Logo SVGs (light + dark) + favicons + webmanifest in public/

Astro setup migrated:
- Dropped @astrojs/starlight + starlight-tailwind + tailwind v3 adapter
- Added @astrojs/vue + @astrojs/mdx + @tailwindcss/vite (Tailwind v4)
- tsconfig adds ~ / ~/* path alias

Content restructured:
- src/content.config.ts (Astro 5 glob loader) replaces the Starlight
  config. Schema mirrors the sibling's docs: title, description,
  published, updated, order, section, tags
- All 10 existing markdown pages get published + section + order
- Stripped duplicate body h1 (DocsLayout's header already shows title)
- Removed index.mdx (Starlight splash); new pages/index.astro hero

12 pages build cleanly. Inert legacy files (custom.css, old logo.svg)
left in place per never-delete-source rule.
Astro 7 (pulled in by the redesign) requires Node >= 22.12.0. The
previous pin to Node 20 was set when the docs site ran on Astro 5
via Starlight and worked fine; now it crashes on startup with
'Node.js v20.20.2 is not supported by Astro'.

22 is the current LTS and what the sibling browser project uses.
@ronaldtse
ronaldtse merged commit 803ec2e into main Jul 25, 2026
13 checks passed
@ronaldtse
ronaldtse deleted the docs/redesign-matching-sibling branch July 25, 2026 00:46
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