forked from strands-agents/docs
-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
Work item to migrate our existing mkdocs site to Astro Starlight/Astro.
At the end of this task, the docs site should be runnable on Starlight/Astro using the existing markdown docs.
On a branch (new_docs), create an astro/starlight project (via NPM) that renders all pages that currently exist in mkdocs today. For page titles and navigation, read from the mkdocs.yml file.
Implementation Requirements
Based on clarification discussion and repository analysis.
Technical Approach
- Target Framework: Astro with Starlight documentation theme
- Branch:
new_docs - Coexistence: Keep both Astro and MkDocs configurations side-by-side (migration/removal of MkDocs will be done later)
- Navigation Source: Parse
mkdocs.ymlprogrammatically to generate Starlight sidebar configuration
Project Setup
- Initialize Starlight project via
npm create astro@latest -- --template starlight - Configure to coexist with existing MkDocs setup
- Set up build scripts to parse
mkdocs.ymlfor navigation
Content Migration
- All 135 existing markdown docs render correctly
- Preserve existing directory structure under
docs/ - Assets (images, logos) accessible and rendering
Mermaid Diagrams
- Install and configure starlight-mermaid plugin or equivalent
- Verify mermaid code blocks render correctly (20+ files use mermaid)
- Test diagrams in:
user-guide/quickstart/,examples/python/,user-guide/concepts/
Tabbed Content
- Migrate
=== "Python"/=== "TypeScript"syntax to Starlight<Tabs>component - Ensure code tabs display correctly throughout docs
Custom Macros (if feasible)
- Create Astro/MDX equivalents for
ts_not_supported()macro - Create Astro/MDX equivalents for
ts_not_supported_code()macro - Keep syntax compatible with current usage for merge simplicity
Snippet Includes
- Implement alternative for
--8<--snippet markers used in TypeScript examples - Ensure external code file inclusion works for
.tsfiles
Error Page
- Use Starlight's default 404 page (no custom implementation needed)
Out of Scope (Deferred to Follow-up Tasks)
- ❌ API documentation generation (Python/TypeScript)
- ❌ Search exclusion configuration (depends on API docs)
- ❌ Mike versioning / version selector
- ❌ Removal of MkDocs configuration
Acceptance Criteria
- Existing docs render using default Starlight theme
- Mermaid diagrams render correctly
- Error page renders successfully (default 404)
- Navigation structure matches current mkdocs.yml hierarchy
- Site runs locally with
npm run dev - Both Astro and MkDocs can coexist in the repository
Files to Create/Modify
New Files (Starlight Project)
astro.config.mjs- Astro configurationsrc/content/config.ts- Content collection configsrc/content/docs/- Symlink or reference to existingdocs/package.jsonupdates for Astro dependencies- Navigation generation script (parse mkdocs.yml)
Existing Files to Preserve
mkdocs.yml- Keep as-isdocs/**/*.md- No modifications neededdocs/assets/- Keep as-ismacros.py- Keep for MkDocs compatibility
Reference Information
Current MkDocs Features Used
| Feature | MkDocs Implementation | Starlight Equivalent |
|---|---|---|
| Navigation | nav: in mkdocs.yml |
Sidebar config / autogenerate |
| Mermaid | pymdownx.superfences | starlight-mermaid plugin |
| Tabs | pymdownx.tabbed | <Tabs> component |
| Admonitions | admonition extension | <Aside> component |
| Code highlighting | codehilite | Built-in |
| Snippets | pymdownx.snippets | Custom component needed |
Useful Resources
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels