Skip to content

First Example

Let’s walk through adding a new page — “Deploy to Fly.io” — and watch it propagate to the sidebar, llms.txt, and the MCP resource list.

src/content/docs/en/tutorials/deploy-to-fly.md
---
title: Deploy to Fly.io
description: Host Read.Wiki in SSR mode on Fly.io
tags: [deploy, fly.io]
difficulty: intermediate
---
## Prerequisites
...body...

Frontmatter fields are validated by src/content.config.ts:

  • title / description: required
  • tags: string array
  • difficulty: beginner / intermediate / advanced
  • apiType: function / class / method / property / interface
  • version: string
Terminal window
pnpm dev

Open http://localhost:4321/en/tutorials/deploy-to-fly/. Starlight auto-generates the sidebar for the tutorials directory and Pagefind indexes the page.

Once a file enters the docs content collection, all three AI paths pick it up automatically:

Terminal window
# appears in the page listing
curl http://localhost:4321/llms.txt | grep 'deploy-to-fly'
# full text is fetchable
curl http://localhost:4321/llms-full.txt | grep -A5 'Deploy to Fly.io'
# MCP search tool hits it
curl -X POST http://localhost:4321/mcp \
-H 'Content-Type: application/json' \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"search_docs","arguments":{"query":"fly"}}}'

Create a parallel file at src/content/docs/zh/tutorials/deploy-to-fly.md. If the translation isn’t ready, the language switcher will fall back gracefully.