Appearance
Adding a repository
A new repository needs one command. The sidebar, the switcher, the Repositories menu and the home page all pick it up from the files it creates.
1. Generate the section
bash
npm run new:repo -- <repo-slug> "<Display name>" "<One-line description>" \
--github EdikyLab/<repo> --icon <icon> --order <n>| Argument | Example | Notes |
|---|---|---|
repo-slug | ediky-mobile | Folder name under docs/repos/, lowercase kebab-case |
| Display name | ediky-mobile | Shown in the sidebar, switcher and breadcrumbs |
| Description | Mobile client for Ediky. | One line. Shown under the name in the switcher |
--github | EdikyLab/ediky-mobile | Defaults to EdikyLab/<display name> |
--icon | monitor | Any name from docs/.vitepress/icons.mjs. Defaults to package |
--order | 3 | Position in repository lists. Defaults to 50 |
This writes:
text
docs/repos/<repo-slug>/
├── index.md Overview
├── architecture.md Architecture
├── modules/index.md Modules
├── components/index.md Components
├── functions/index.md Functions
├── apis/index.md APIs
├── configuration.md Configuration
├── dependencies.md Dependencies
└── contributing.md ContributingExisting files are never overwritten (pass --force to regenerate).
2. Add pages
bash
npm run new:page -- <repo-slug> module <page-slug> "<Title>"
npm run new:page -- <repo-slug> component <page-slug> "<Title>"
npm run new:page -- <repo-slug> function <page-slug> "<Title>"
npm run new:page -- <repo-slug> api <page-slug> "<Title>"Each page appears in the sidebar under its section. Add a row for it in the section's index.md table.
3. Trim what doesn't apply
If a section doesn't fit the repository (for example components/ in an infrastructure repository), delete its folder. The sidebar follows.
4. Update the cross-repository pages
Add the repository to the diagrams and tables in Overall Architecture and Repository Dependencies.
Optional: attach existing long-form guides
Guides that live outside docs/repos/ (like /website/*) are attached to a repository's sidebar in the GUIDES map in docs/.vitepress/config.mjs. Guides written inside the repository's folder need no registration. For example, a docs/repos/<repo>/guides/ folder shows up automatically.