Skip to content

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

Merged
ronaldtse merged 0 commit into
mainfrom
docs/redesign-matching-sibling
Jul 25, 2026
Merged

ronaldtse merged 0 commit 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

@ronaldtse
ronaldtse merged this pull request 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