gram/packages/docs
Repository files (latest commit first)
Filename Latest commit message Latest commit date
abiwab ac0f00b57f
All checks were successful
CI / Build & Test (pull_request) Successful in 6m59s
docs: proofreading pass on site copy
2026-12-01 18:02:52 +01:00
..
.vscode feat(docs): initialize Astro 7.1 project for new documentation 2026-07-28 19:03:13 +02:00
public docs: proofreading pass on site copy 2026-12-01 18:02:52 +01:00
scripts chore(docs): raise the playground bundle budget to 1100 KB 2026-11-30 14:19:24 +01:00
src docs: proofreading pass on site copy 2026-12-01 18:02:52 +01:00
.gitignore feat(docs): initialize Astro 7.1 project for new documentation 2026-07-28 19:03:13 +02:00
astro.config.mjs fix(docs): raise contrast of inline code, orange buttons, light accent text and code comments 2026-11-30 15:11:23 +01:00
CHANGELOG.md chore: release v1.6.0 2026-12-01 14:38:56 +01:00
package.json chore: release v1.6.0 2026-12-01 14:38:56 +01:00
README.md docs: refresh root and package READMEs for v1.5 2026-11-19 12:01:21 +01:00
tsconfig.json docs(editors): add a supported editors page with a feature matrix 2026-11-24 17:11:52 +01:00
tsconfig.vue.json docs: review v1.5 documentation, reorganize sidebar, and add docs landing page 2026-11-19 11:45:40 +01:00

@gram-lang/docs

The Gram documentation site and browser playground: gram-lang.org. Built with Astro + Starlight, with a Vue-based playground island.

Structure

src/
├── components/       # Astro components (homepage, DocsHome, ChangelogPage, Sidebar, overrides)
│   └── playground/    # Vue playground: editor, output panes, options
├── content/
│   ├── docs/          # Starlight docs collection (EN at docs/docs/**, FR at docs/fr/docs/**)
│   └── blog/          # Blog posts (en/, fr/)
├── data/              # Structured content: homepage copy, terms, blog topics, API reference data
├── layouts/           # Layout.astro — shared shell for non-Starlight pages (home, blog, playground)
├── lib/               # Shared utilities (changelog/release loaders, head scripts, FR/EN resolution)
├── pages/             # Astro routes; fr/ mirrors the English tree
└── styles/            # global.css and starlight/layers.css

Routing: Starlight docs live under /docs/** and /fr/docs/** (not at the root) purely via content-collection file layout, so they don't collide with the Astro-native homepage at /.

Commands

Run from this directory, or via turbo/bun run --filter=@gram-lang/docs <script> from the repo root:

Command Action
bun dev Start the dev server at localhost:4321
bun run build Build the static site to ./dist/, then check bundle size
bun run preview Preview the production build locally
bun run typecheck Run astro check and vue-tsc

No environment variables are required — the site builds fully statically, with no runtime secrets.

Notes

  • astro/@astrojs/starlight/@astrojs/vue/@astrojs/mdx/@astrojs/markdown-remark are pinned to the current stable range in package.json (astro ^7.4.x / Starlight ^0.43.x); keep them on ^7.1.x/Starlight ^0.41.x or later — astro@7.0.2's dev server is broken in this hoisted Bun monorepo (fixed in 7.1.5).
  • scripts/check-bundle-size.mjs enforces a size budget on the playground's JS chunk (CodeMirror 6 + Shiki, self-hosted); raise the budget deliberately in that file if a change legitimately grows it.
  • scripts/vendor-starlight-tokens.ts and scripts/generate-llms-full.ts run as prebuild steps (syncing Starlight tokens and regenerating public/llms-full.txt/llms.txt).