Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
76 changes: 76 additions & 0 deletions packages/docs/astro.config.mjs
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
import { defineConfig } from "astro/config";
import starlight from "@astrojs/starlight";
import starlightLinksValidator from "starlight-links-validator";
import starlightLlmsTxt from "starlight-llms-txt";
import starlightPageActions from "starlight-page-actions";

// https://astro.build/config
export default defineConfig({
Expand Down Expand Up @@ -28,6 +31,79 @@ export default defineConfig({
},
lastUpdated: true,
credits: true,
plugins: [
// 1) LLM-crawlable bundles. Emits /llms.txt, /llms-full.txt,
// /llms-small.txt at build time. Must run first so page-actions
// sees it already registered.
starlightLlmsTxt({
projectName: "OpenCodeHub",
description:
"Apache-2.0 code intelligence graph + MCP server for AI coding agents. Gives agents callers, callees, processes, and blast radius in one MCP tool call — local, offline-capable, deterministic.",
details:
"OpenCodeHub indexes a repository into a hybrid structural + semantic knowledge graph and exposes it over the Model Context Protocol (MCP) to AI coding agents. The MCP server registers 28 tools spanning search, change-impact, findings, and cross-repo groups. The CLI binary is `codehub`. Runtime: Node 22, pnpm 10, DuckDB + hnsw_acorn storage, 15 tree-sitter languages, SCIP indexers for TypeScript / Python / Go / Rust / Java.",
promote: [
"start-here/**",
"guides/**",
"mcp/**",
],
demote: [
"architecture/**",
"contributing/**",
],
// Keep llms-small.txt tight by dropping internals-y prose.
exclude: [],
minify: {
note: true,
tip: true,
details: true,
whitespace: true,
caution: false,
danger: false,
},
customSets: [
{
label: "user-guide",
paths: ["start-here/**", "guides/**"],
description:
"User-facing pages only: install, quick-start, editor integration guides.",
},
{
label: "mcp",
paths: ["mcp/**", "reference/**"],
description:
"MCP surface: server tools, resources, prompts, CLI reference, error codes, language matrix.",
},
{
label: "contributing",
paths: ["contributing/**", "architecture/**"],
description:
"Developer and architecture docs: dev loop, release flow, ADRs, determinism, supply-chain.",
},
],
}),

// 2) Per-page "Copy as Markdown" + "Open in ChatGPT" + "Open in
// Claude" + Share. IMPORTANT: do NOT set `baseUrl`, or this
// plugin will try to own /llms.txt too and collide with
// starlight-llms-txt. Leave llms generation to plugin #1.
starlightPageActions({
actions: {
markdown: true,
chatgpt: true,
claude: true,
t3chat: false,
v0: false,
},
share: true,
}),

// 3) Build-time broken-link check. Runs after content is built
// but before deploy, so llms-full.txt never ships dead links.
starlightLinksValidator({
errorOnFallbackPages: false,
errorOnInconsistentLocale: false,
}),
],
sidebar: [
{
label: "Start Here",
Expand Down
5 changes: 5 additions & 0 deletions packages/docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,10 @@
"@astrojs/starlight": "^0.38.4",
"astro": "^6.1.9",
"sharp": "^0.34.1"
},
"devDependencies": {
"starlight-links-validator": "^0.24.0",
"starlight-llms-txt": "^0.8.1",
"starlight-page-actions": "^0.6.0"
}
}
Loading
Loading