Editing Guide for Maintainers
The SisterShield documentation site is built with Astro Starlight, a documentation framework built on Astro. This guide covers everything a maintainer needs to know to edit existing pages, add new content, and build the site.
File Structure
docs-site/ astro.config.mjs -- Astro + Starlight configuration (sidebar, locales, social) package.json -- Dependencies and scripts src/ content/ docs/ en/ -- English content introduction/ -- Project introduction pages technical-docs/ -- Technical documentation maintainers/ -- This guide ko/ -- Korean content (mirrored structure) styles/ custom.css -- Custom CSS overridesEach .md file in src/content/docs/ corresponds to a page in the documentation site. The file path determines the URL: en/technical-docs/architecture/overview.md maps to /docs/technical-docs/architecture/overview/.
How to Edit a Documentation Page
- Open the relevant
.mdfile indocs-site/src/content/docs/en/(orko/for Korean). - Edit the Markdown content. Every file must begin with a frontmatter block:
---title: "Page Title"description: "Short description for SEO and link previews."---- Save the file. If the dev server is running, changes are reflected immediately via hot reload.
How to Add a New Page
Step 1: Create the Markdown File
Create a new .md file in the appropriate directory under src/content/docs/en/. For example, to add a new page under Technical Docs:
docs-site/src/content/docs/en/technical-docs/new-topic.mdAdd the required frontmatter:
---title: "New Topic"description: "Description of this new topic."---Step 2: Add to the Sidebar
Open docs-site/astro.config.mjs and add an entry to the sidebar array in the appropriate section:
{ label: 'New Topic', translations: { ko: 'Korean label here' }, link: '/technical-docs/new-topic/',},The link value must match the file path relative to src/content/docs/en/, with leading / and trailing /.
Step 3: Create the Korean Version (Optional)
Create the same file at docs-site/src/content/docs/ko/technical-docs/new-topic.md with Korean content. If no Korean version exists, Starlight will fall back to the English version.
How to Add a New Locale
Starlight supports multiple locales. To add a new language:
- Register the locale in
astro.config.mjs:
locales: { en: { label: 'English', lang: 'en' }, ko: { label: '한국어', lang: 'ko' }, ja: { label: '日本語', lang: 'ja' }, // new locale},- Create the content directory:
docs-site/src/content/docs/ja/. - Add translated files mirroring the
en/structure. Any missing files will fall back to the default locale (English). - Add
translationsentries to sidebar items inastro.config.mjs.
How to Add Mermaid Diagrams
Mermaid diagrams are written inside fenced code blocks with the mermaid language tag:
```mermaidgraph TD A[Start] --> B[Process] B --> C[End]```Supported diagram types: graph/flowchart, sequenceDiagram, classDiagram, stateDiagram-v2, erDiagram.
How to Use Starlight Callouts
Starlight provides built-in callout components using the ::: syntax:
:::noteThis is an informational note.:::
:::tipA helpful tip for the reader.:::
:::cautionA warning about something to be careful with.:::
:::dangerA critical warning about something that could cause problems.:::These render as styled callout boxes with appropriate colors and icons.
How to Use Starlight Components
Starlight includes several built-in components that can be imported in MDX files. For standard Markdown (.md), the ::: callout syntax is the primary component mechanism.
For MDX files (.mdx), you can import Starlight components:
import { Tabs, TabItem } from '@astrojs/starlight/components';
<Tabs> <TabItem label="npm">npm install</TabItem> <TabItem label="pnpm">pnpm install</TabItem></Tabs>How to Build and Preview Locally
Development Server
cd docs-sitenpm installnpm run devThe site runs at http://localhost:4321/docs/. Changes to .md files trigger hot reload.
Production Build
cd docs-sitenpm run buildThe output is generated in docs-site/dist/. Preview the built site:
npm run previewContent Rules
- Evidence-first: Every claim must be traceable to the codebase or a cited source. Do not invent statistics.
- TODO placeholders: Mark incomplete content with
TODO:(e.g.,TODO: Add benchmarks). - Code accuracy: File paths and function names must match the actual codebase.
- Keep current: Update docs when the codebase changes.
- No emojis: Use standard punctuation and formatting only.
Quick Reference: Common Tasks
| Task | Steps |
|---|---|
| Fix a typo | Edit the .md file, save |
| Add a new section to existing page | Edit the .md file, add heading + content |
| Add a new page | Create .md file + add to sidebar in astro.config.mjs |
| Add a diagram | Use ```mermaid code block |
| Add a callout | Use :::note / :::tip / :::caution / :::danger syntax |
| Remove a page | Delete the .md file + remove from sidebar in astro.config.mjs |
| Change sidebar order | Reorder items in the sidebar array in astro.config.mjs |
| Add Korean translation | Create matching file in ko/ directory |