Build a documentation site
CloudGrid has a docs-app archetype for a multi-page documentation site:
Astro Starlight with sidebar navigation,
client-side full-text search, and agent-readable llms.txt / llms-full.txt
generated on every build. Ask an agent connected to the CloudGrid MCP for “a docs
site for X” and it uses this archetype; you can also build it by hand with the
steps below.
For a quick single page baked into one HTML file, you want a simpler static page,
not this. docs-app is for docs you will keep editing.
Scaffold
Section titled “Scaffold”A docs-app is a normal Astro Starlight project. The minimal shape:
package.json Astro + Starlight + starlight-llms-txtastro.config.mjs site config, sidebar, the llms.txt plugintsconfig.jsoncloudgrid.yaml static service, built and served at the rootsrc/content.config.tssrc/content/docs/ your pages (Markdown / MDX)astro.config.mjs wires Starlight and the starlight-llms-txt plugin:
import { defineConfig } from 'astro/config';import starlight from '@astrojs/starlight';import starlightLlmsTxt from 'starlight-llms-txt';
export default defineConfig({ site: 'https://example.com', integrations: [ starlight({ plugins: [ starlightLlmsTxt({ projectName: 'My Project', description: 'One-line summary shown to agents at /llms.txt.', }), ], title: 'My Project Docs', sidebar: [ { label: 'Start here', items: [{ label: 'Introduction', slug: 'index' }] }, ], }), ],});A docs-app is served at your entity root (for example
https://my-docs--your-grid.cloudgrid.io/), so do not set a base.
cloudgrid.yaml
Section titled “cloudgrid.yaml”Declare one static service with a build step, served at the root:
name: my-docsservices: site: type: static path: / node_version: "22" source: path: . build: command: "npm run build" output: "dist"source.path: . tells the platform the project is at the folder root; without it
the build looks for services/site/ and fails. There is no needs: — a docs
site has no infrastructure. See the cloudgrid.yaml reference
for the full schema.
Deploy
Section titled “Deploy”docs-app is a built, multi-file site, so deploy it with the CLI (or an agent in
the local MCP edition) — see Install and the
core lifecycle:
npm installgrid plugThe platform runs npm run build and serves the output. The build is async — the
CLI reports progress and prints the live URL when it is up. To update the site,
edit the content and run grid plug again; it updates the same URL.
Agent-readable docs
Section titled “Agent-readable docs”Every build generates, at your site root:
| Path | What |
|---|---|
/llms.txt |
A curated index — the file agents look for first. |
/llms-full.txt |
The full documentation in one file, ideal for an agent to read. |
/llms-small.txt |
An abridged variant. |
Point an agent at <your-site>/llms.txt and it can read your whole doc set.
Share it
Section titled “Share it”A new deploy starts private to your grid. Choose who can open it with
grid visibility — see Visibility and sharing.