From c8cb9fa9a540b88d0c7d8220b809a7f4656d5bfd Mon Sep 17 00:00:00 2001
From: Urata Daiki <7nohe@users.noreply.github.com>
Date: Sun, 15 Nov 2026 10:27:56 +0900
Subject: [PATCH] docs: improve how search engines and LLMs find and read the
site
Search engines:
- add robots.txt pointing at the sitemap
- give the home page its own
instead of the site name twice
- describe the software in JSON-LD on the home page, and each other page
as a TechArticle with a breadcrumb
- rewrite the page descriptions that only repeated the page title
- fix the heading level of --initialPageParam in the CLI options
LLMs and coding agents:
- build llms.txt from the pages with starlight-llms-txt, which adds
llms-full.txt, llms-small.txt and one file per topic. The handwritten
llms.txt had fallen behind (it did not list the benchmarks).
- serve every page as Markdown at its own address plus .md, and link it
from the page with rel="alternate"
- keep the Markdown copies out of search results with X-Robots-Tag
hast-util-to-mdast resolves to 10.1.2: 10.1.3 was published less than
seven days ago.
---
docs/astro.config.mjs | 89 +++-
docs/package.json | 1 +
docs/public/llms.txt | 35 --
docs/public/robots.txt | 4 +
docs/src/content/docs/examples/nextjs.md | 2 +-
.../src/content/docs/examples/react-router.md | 2 +-
.../content/docs/examples/tanstack-router.md | 2 +-
docs/src/content/docs/examples/vite-react.md | 2 +-
.../src/content/docs/guides/ci-and-agents.mdx | 2 +-
docs/src/content/docs/guides/cli-options.mdx | 4 +-
docs/src/content/docs/guides/introduction.mdx | 2 +-
.../content/docs/guides/migrating-to-v3.mdx | 2 +-
.../content/docs/guides/migrating-to-v4.mdx | 2 +-
docs/src/content/docs/guides/usage.mdx | 2 +-
docs/src/content/docs/index.mdx | 13 +-
docs/src/pages/[...slug].md.ts | 27 ++
docs/src/routeData.ts | 57 +++
docs/vercel.json | 21 +
pnpm-lock.yaml | 387 +++++++++++++++++-
19 files changed, 602 insertions(+), 54 deletions(-)
delete mode 100644 docs/public/llms.txt
create mode 100644 docs/public/robots.txt
create mode 100644 docs/src/pages/[...slug].md.ts
create mode 100644 docs/src/routeData.ts
create mode 100644 docs/vercel.json
diff --git a/docs/astro.config.mjs b/docs/astro.config.mjs
index cdb5fabc..b1f85f77 100644
--- a/docs/astro.config.mjs
+++ b/docs/astro.config.mjs
@@ -2,10 +2,27 @@ import { satteri } from "@astrojs/markdown-satteri";
import starlight from "@astrojs/starlight";
// @ts-check
import { defineConfig } from "astro/config";
+import starlightLlmsTxt from "starlight-llms-txt";
const site = "https://orqc.7nohe.dev";
const ogUrl = new URL("og.jpg", site).href;
const ogImageAlt = "OpenAPI React Query Codegen";
+const repo = "https://github.com/7nohe/openapi-react-query-codegen";
+
+// What a model reads first in /llms.txt, before it decides which of the
+// documentation sets below to fetch.
+const llmsDescription =
+ "`@7nohe/openapi-react-query-codegen` is a CLI (`orqc`; `openapi-rq` also works) that generates TanStack Query v5 (React Query) hooks from an OpenAPI 3.0/3.1 specification. It generates a TypeScript HTTP client (fetch or axios) in `