Unified VitePress site that aggregates the documentation of
every repo in the schulydev org into one searchable,
cross-linkable site.
Each source repo keeps its docs next to its code in a docs/ folder. A GitHub Actions
workflow in each repo syncs that folder into docs/<Repo>/ here on every push to main,
and Cloudflare Pages rebuilds the site automatically.
You usually don't edit docs in this repo. Edit
docs/in the source repo; it shows up here within a minute. The only things owned here are the site config (docs/.vitepress/config.mjs) and thedocs/getting-started/walkthrough.
source repos (Schuly, SchulyBackend, ...) this repo (SchulyDocs) Cloudflare Pages
docs/** --push to main--> GH Action --commit--> docs/<Repo>/ --push--> rebuild & deploy
- One VitePress site. Every repo's docs live under
docs/<Repo>/, giving unified local search and cross-linking between sections. - Section labels and ordering live in the
SECTIONSmap indocs/.vitepress/config.mjs. Everything insidedocs/<Repo>/is replaced on each sync (so deletions in the source propagate) — the synced folders hold only the source repo's markdown. - The sidebar is generated from the
docs/tree byconfig.mjs, so contributors just add markdown. Each section'sREADME.mdis the section landing page (arewritesrule maps**/README.md→index.md, since VitePress only treatsindex.mdas a folder index). docs/getting-started/is an end-user walkthrough owned by this repo (no source repo syncs into it), so edit it here directly.
Uses bun (never npm/node directly).
bun install
bun run dev # dev server at http://localhost:5173
bun run build # production build into docs/.vitepress/dist
bun run preview # serve the production build locallyTo preview with the latest docs from sibling repos cloned next to this one:
bash scripts/sync-docs.sh
bun run devCloudflare Pages has native GitHub integration; it watches this repo and rebuilds on every push.
- Cloudflare dashboard → Workers & Pages → Create → Pages →
Connect to Git → pick
schulydev/SchulyDocs. - Framework preset: VitePress (or None) and set:
- Build command:
bun run build - Build output directory:
docs/.vitepress/dist - Env var:
BUN_VERSION(keepbun.lockcommitted; Cloudflare detects bun from it).
- Build command:
- Deploy. You get a
*.pages.devURL. Add the custom domaindocs.schuly.devunder the project's Custom domains tab.
From then on: any push here (including the automated doc-sync commits) triggers a rebuild.
- Copy
templates/sync-docs.ymlinto the source repo at.github/workflows/sync-docs.yml. - No secret to create — it uses the org-level
MAIN_PUSH_TOKENsecret already used by the other cross-repo sync workflows in this org. - Push a change under
docs/(or run the workflow manually). The workflow opens a PR against this repo and auto-merges it (matching the org's sync convention), which triggers the Cloudflare Pages rebuild.
To add a brand-new repo's section: add an entry to the SECTIONS array in
docs/.vitepress/config.mjs (its dir and display text) and add the repo to the list
in scripts/sync-docs.sh.
- Source docs are plain GitHub-flavored Markdown. VitePress compiles markdown through Vue,
so raw
{{ }}or stray HTML-like</tag>lines in a.mdfile will break the build — keep such content inside code fences. - Mermaid ```mermaid code blocks render via
vitepress-plugin-mermaid. - Nested folders (e.g.
setup/) become collapsible sub-groups labeled by folder name. - Cross-section links should use absolute site paths (e.g.
/SchulyBackend/architecture) or full GitHub URLs; relative links only resolve within the same section.