Skip to content

docs: migrate documentation site from VitePress to Astro Starlight#123

Merged
knowledgecode merged 8 commits intomasterfrom
develop
Apr 29, 2026
Merged

docs: migrate documentation site from VitePress to Astro Starlight#123
knowledgecode merged 8 commits intomasterfrom
develop

Conversation

@knowledgecode
Copy link
Copy Markdown
Owner

@knowledgecode knowledgecode commented Apr 29, 2026

Summary

  • Migrate the documentation site from VitePress to Astro Starlight, a modern documentation framework built on Astro
  • Convert docs pages to MDX format where needed and remove VitePress-specific config and files
  • Polish the migrated site: fix hero image, sidebar links, frontmatter titles, and visual styling to match the previous VitePress look

Changes

Migration

  • Replace docs/.vitepress/config.ts with astro.config.mjs (Starlight sidebar, site metadata, navigation)
  • Add docs/content.config.ts with glob loader for all docs pages
  • Move logo from docs/public/ to docs/assets/ for Astro asset handling
  • Add docs/env.d.ts for Astro type declarations

Build & CI

  • Set outDir to pages/ (separate from dist/) and update CI workflow upload path accordingly
  • Add pages/ to .gitignore
  • Update package.json scripts, devDependencies, and remove esbuild override
  • Fix eslint.config.js to ignore .mjs/.astro files; fix tsconfig.json to exclude docs/ and dist/

Docs content

  • Convert docs/index.mddocs/index.mdx (Starlight splash template with hero)
  • Convert docs/guide/installation.mddocs/guide/installation.mdx (Tabs component + Aside)
  • Add intro paragraphs and usage examples to locales.md and timezones.md
  • Add docs/styles/custom.css to replicate VitePress heading scale, accent colors, table styles, and pagination
  • Add docs/tsconfig.json for Astro's type resolution
  • Remove redundant # h1 headings from all docs pages (Starlight renders the frontmatter title as h1 automatically)

Test plan

  • npm run docs:dev — verify local dev server starts and renders pages correctly
  • npm run docs:build — verify build succeeds and outputs to pages/
  • Check hero image, sidebar navigation, and inter-page links
  • Check locales and timezones pages render intro sections and code examples correctly
  • Verify CI workflow uploads pages/ artifact on push to master

- Set astro outDir to pages/ to separate build output from src
- Update CI workflow to upload pages/ artifact instead of dist/
- Add custom CSS to match VitePress visual style in Starlight
- Add favicon.svg and docs/tsconfig.json for Astro
- Remove outdated logo.png (replaced by inline SVG or Astro asset)
- Ignore .mjs and .astro in eslint; exclude docs/dist from tsconfig
- Bump dev dependency versions and remove esbuild override
- Add intro paragraphs and usage examples to locales.md and timezones.md
- Promote locale list items from - bullets to ### headings for TOC support
- Fix homepage hero to use Astro local image asset instead of raw HTML
- Fix action and API links to remove trailing slash
- Replace VitePress :::tip[...] syntax with Starlight <Aside> component
Starlight automatically renders the frontmatter title as the page h1,
so the explicit # Heading lines were duplicate and visually redundant.
@knowledgecode knowledgecode merged commit 80dec7b into master Apr 29, 2026
4 checks passed
@knowledgecode knowledgecode deleted the develop branch April 29, 2026 08:58
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