Constellation Documentation Management Guide
Constellation Documentation Management Guide
Section titled “Constellation Documentation Management Guide”Constellation is a file-based documentation system that automatically syncs markdown files from your repository - it’s not a CMS. Here’s how to manage content.
How Constellation Works
Section titled “How Constellation Works”File-based Documentation:
- All docs are
.md
and.mdx
files stored throughout your repo - The
sync-md.js
script automatically finds and copies them toconstellation/src/content/docs/
- Starlight then generates the website from these files
How to Add/Edit Documentation
Section titled “How to Add/Edit Documentation”1. Edit Existing Docs
Section titled “1. Edit Existing Docs”Just edit any .md
file anywhere in your repo:
# Edit any markdown file directlyvim docs/security.mdvim ops/README.mdvim infrastructure/SETUP.md
2. Add New Documentation
Section titled “2. Add New Documentation”Create new .md
files anywhere in your repo:
# Create new docs anywhereecho "# New Feature Guide" > features/new-feature.md
3. Update the Sidebar
Section titled “3. Update the Sidebar”After adding new docs, update the manual sidebar in:
sidebar: [ { label: "Your Category", items: [ { label: "New Feature", link: "/new-feature" }, ] }]
4. Sync and Deploy
Section titled “4. Sync and Deploy”# Run sync script to copy filescd constellation && npm run sync
# Build and preview locallynpm run buildnpm run preview
# Commit and push to deploy via Vercelgit add . && git commit -m "docs: Add new documentation"git push
Key Files
Section titled “Key Files”- Content: Any
.md
/.mdx
file in your repo - Navigation:
constellation/astro.starlight.config.mjs
(manual sidebar) - Sync:
constellation/scripts/sync-md.js
(auto-copies files) - Homepage:
constellation/src/content/docs/index.mdx
(custom, preserved during sync)
Workflow Example
Section titled “Workflow Example”-
Create new documentation:
Terminal window echo "# API Documentation" > api/README.md -
Add to sidebar:
// In constellation/astro.starlight.config.mjs{label: "API",items: [{ label: "API Documentation", link: "/readme" },]} -
Sync and test:
Terminal window cd constellationnpm run syncnpm run preview -
Deploy:
Terminal window git add .git commit -m "docs: Add API documentation"git push
Best Practices
Section titled “Best Practices”- Use descriptive filenames - they become the URL slug
- Add frontmatter for better metadata:
---title: "Custom Page Title"description: "Page description for SEO"---
- Organize by categories in the sidebar configuration
- Test locally with
npm run preview
before pushing - Keep the homepage (
index.mdx
) updated with navigation links
Technical Details
Section titled “Technical Details”- Framework: Astro + Starlight
- Content: Markdown with frontmatter
- Deployment: Vercel (auto-deploys on push to main)
- Sync: Automated file copying from repo root to
src/content/docs/
- Navigation: Manual sidebar configuration (no auto-generation)
This is a docs-as-code approach - you manage documentation like code, not through a CMS interface.