Overview
Transition the sidebar and navbar configuration from mkdocs.yml to a new Astro-native YAML configuration file. This will complete the migration from MkDocs to Astro/Starlight by removing the legacy dependency on mkdocs.yml.
Background
The repository has transitioned from MkDocs to Astro/Starlight, but the sidebar navigation is still being read from mkdocs.yml via src/sidebar.ts. The top-nav is separately configured in src/config/navbar.ts. This task consolidates both into a single, cleaner YAML configuration.
Implementation Requirements
1. Create New Configuration File
File: src/config/navigation.yml
Create a new YAML configuration that combines:
- Navbar links (currently in
src/config/navbar.ts)
- Sidebar structure (currently in
mkdocs.yml nav section)
- GitHub dropdown sections (currently in
src/config/navbar.ts)
Simplified structure (files only need slugs, not labels - labels come from frontmatter):
navbar:
- label: Home
href: /
- label: User Guide
href: /docs/user-guide/quickstart/overview/
basePath: /docs/user-guide/
- label: Examples
href: /docs/examples/
basePath: /docs/examples/
# ... remaining nav items
sidebar:
- label: User Guide
items:
- docs/index # slug only - label from frontmatter
- label: Quickstart
items:
- docs/user-guide/quickstart/overview
- docs/user-guide/quickstart/python
- docs/user-guide/quickstart/typescript
- label: Concepts
items:
- label: Agents
items:
- docs/user-guide/concepts/agents/agent-loop
# ... etc
# ... etc
- label: Examples
items:
- docs/examples
# ... etc
# ... remaining sidebar sections
github:
sections:
- title: SDKs
links:
- label: sdk-python
href: https://github.com/strands-agents/sdk-python
icon: PY
- label: sdk-typescript
href: https://github.com/strands-agents/sdk-typescript
icon: TS
- title: Organizations
links:
- label: strands-agents
href: https://github.com/strands-agents
- label: strands-labs
href: https://github.com/strands-labs
2. Update Sidebar Loading Logic
File: src/sidebar.ts
- Replace
loadSidebarFromMkdocs() with loadSidebarFromConfig() (or similar)
- Read from
src/config/navigation.yml instead of mkdocs.yml
- Simplify conversion logic since badges are no longer in config
- Remove
getCommunityLabeledFiles() and getSidebarLabels() functions (badges now come from frontmatter only)
3. Update Navbar Configuration
File: src/config/navbar.ts
- Update to read navbar links from
navigation.yml
- Update to read GitHub sections from
navigation.yml
- Keep TypeScript interfaces (
NavLink, GitHubSection, etc.)
- Export processed data for use in Header component
4. Update Astro Config
File: astro.config.mjs
- Update import to use new sidebar loading function
- Remove any mkdocs.yml references
5. Update Tests
File: test/sidebar.test.ts
- Update to test new configuration format
- Update path references from
mkdocs.yml to navigation.yml
- Remove tests for
getCommunityLabeledFiles and getSidebarLabels if those functions are removed
- Ensure all existing functionality is covered
6. Clean Up Scripts
File: scripts/update-docs.ts
- Remove
MKDOCS_VARIABLES constant (no longer needed)
- Remove any references to mkdocs.yml
- Update or remove
MKDOCS_PATH constant
7. Delete Legacy File
Delete: mkdocs.yml
Remove the file after all dependencies have been migrated.
8. Update Documentation
Update references to mkdocs.yml in:
AGENTS.md - Update directory structure and workflow sections
CONTRIBUTING.md - Update "Writing Docs" section
README.md - Update "Writing Documentation" section
SITE-ARCHITECTURE.md - Update sidebar generation section
CMS-TODO.md - Mark this task as complete
src/content/docs/community/get-featured.mdx - If applicable
Acceptance Criteria
Technical Notes
Badge Handling
Badges (like "new", "community") should come only from frontmatter in the markdown files, not from the navigation config. The existing system already supports this via the sidebar.badge frontmatter field.
Label Handling
File entries in the sidebar config only need the slug - labels are automatically pulled from the page's frontmatter title. Only directory/group entries need explicit labels.
Extra Variables
The extra: section from mkdocs.yml (containing docs_repo, sdk_pypi, etc.) is no longer used and should not be migrated.
Files Summary
| Action |
File |
| Create |
src/config/navigation.yml |
| Modify |
src/sidebar.ts |
| Modify |
src/config/navbar.ts |
| Modify |
astro.config.mjs |
| Modify |
test/sidebar.test.ts |
| Modify |
scripts/update-docs.ts |
| Modify |
AGENTS.md, CONTRIBUTING.md, README.md, SITE-ARCHITECTURE.md, CMS-TODO.md |
| Delete |
mkdocs.yml |
Original Request
Right now the sidebar is still configured in yaml from mkdocs even though we've transitioned to astro/starlight.
We should transition to something (yaml or json) more readable and more integrated with astro/starlight.
If possible, consider integrating the top-nav configuration as well, as right now that's a separate file. Once done we should be able to delete the mkdocs.yml file
Overview
Transition the sidebar and navbar configuration from
mkdocs.ymlto a new Astro-native YAML configuration file. This will complete the migration from MkDocs to Astro/Starlight by removing the legacy dependency on mkdocs.yml.Background
The repository has transitioned from MkDocs to Astro/Starlight, but the sidebar navigation is still being read from
mkdocs.ymlviasrc/sidebar.ts. The top-nav is separately configured insrc/config/navbar.ts. This task consolidates both into a single, cleaner YAML configuration.Implementation Requirements
1. Create New Configuration File
File:
src/config/navigation.ymlCreate a new YAML configuration that combines:
src/config/navbar.ts)mkdocs.ymlnav section)src/config/navbar.ts)Simplified structure (files only need slugs, not labels - labels come from frontmatter):
2. Update Sidebar Loading Logic
File:
src/sidebar.tsloadSidebarFromMkdocs()withloadSidebarFromConfig()(or similar)src/config/navigation.ymlinstead ofmkdocs.ymlgetCommunityLabeledFiles()andgetSidebarLabels()functions (badges now come from frontmatter only)3. Update Navbar Configuration
File:
src/config/navbar.tsnavigation.ymlnavigation.ymlNavLink,GitHubSection, etc.)4. Update Astro Config
File:
astro.config.mjs5. Update Tests
File:
test/sidebar.test.tsmkdocs.ymltonavigation.ymlgetCommunityLabeledFilesandgetSidebarLabelsif those functions are removed6. Clean Up Scripts
File:
scripts/update-docs.tsMKDOCS_VARIABLESconstant (no longer needed)MKDOCS_PATHconstant7. Delete Legacy File
Delete:
mkdocs.ymlRemove the file after all dependencies have been migrated.
8. Update Documentation
Update references to
mkdocs.ymlin:AGENTS.md- Update directory structure and workflow sectionsCONTRIBUTING.md- Update "Writing Docs" sectionREADME.md- Update "Writing Documentation" sectionSITE-ARCHITECTURE.md- Update sidebar generation sectionCMS-TODO.md- Mark this task as completesrc/content/docs/community/get-featured.mdx- If applicableAcceptance Criteria
src/config/navigation.ymlfile created with combined navbar, sidebar, and GitHub configsrc/sidebar.tsupdated to read from new YAML configsrc/config/navbar.tsupdated to read from new YAML configastro.config.mjsupdated with new importsnpm test)npm run build)npm run dev)mkdocs.ymldeletedTechnical Notes
Badge Handling
Badges (like "new", "community") should come only from frontmatter in the markdown files, not from the navigation config. The existing system already supports this via the
sidebar.badgefrontmatter field.Label Handling
File entries in the sidebar config only need the slug - labels are automatically pulled from the page's frontmatter
title. Only directory/group entries need explicit labels.Extra Variables
The
extra:section from mkdocs.yml (containingdocs_repo,sdk_pypi, etc.) is no longer used and should not be migrated.Files Summary
src/config/navigation.ymlsrc/sidebar.tssrc/config/navbar.tsastro.config.mjstest/sidebar.test.tsscripts/update-docs.tsAGENTS.md,CONTRIBUTING.md,README.md,SITE-ARCHITECTURE.md,CMS-TODO.mdmkdocs.ymlOriginal Request