Skip to content

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.

A docs-app is a normal Astro Starlight project. The minimal shape:

package.json Astro + Starlight + starlight-llms-txt
astro.config.mjs site config, sidebar, the llms.txt plugin
tsconfig.json
cloudgrid.yaml static service, built and served at the root
src/content.config.ts
src/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.

Declare one static service with a build step, served at the root:

name: my-docs
services:
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.

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:

Terminal window
npm install
grid plug

The 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.

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.

A new deploy starts private to your grid. Choose who can open it with grid visibility — see Visibility and sharing.