Skip to content

Commit b43d6fd

Browse files
Migrate docs to Vocs v2 (#114)
1 parent f42eafb commit b43d6fd

50 files changed

Lines changed: 4978 additions & 3655 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@scaffold-ui/debug-contracts": patch
3+
---
4+
5+
Mark `Contract` and `IntegerInput` as client components (`"use client"`). Both call React hooks, so importing them into a React Server Component (Next.js App Router, Vocs v2) previously threw at render. The components package already marks its interactive components this way; this brings debug-contracts in line.

.github/workflows/release.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,12 @@ jobs:
3737
- name: Install dependencies
3838
run: pnpm install
3939

40+
# Build only the publishable packages, not the docs/example apps. A package
41+
# release has no reason to build the docs site, and doing so would drag in
42+
# Vite 8 / rolldown, whose native binding pnpm's hoisted linker doesn't link
43+
# on a plain CI install.
4044
- name: Build packages
41-
run: pnpm build
45+
run: pnpm build:packages
4246

4347
- name: Create Release Pull Request or Publish to npm
4448
id: changesets

.gitignore

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
node_modules
22
.pnpm-store/
33
.pnpm-debug.log
4+
.vercel
45

56
# Generated at build time by docs/scripts/gen-sitemap.ts (see docs/vocs.config.ts)
67
docs/public/sitemap.xml
78

8-
# Generated at build time by docs/scripts/gen-agent-skills-index.ts
9-
docs/public/.well-known/
9+
# Generated at build time by docs/scripts/gen-agent-skills-index.ts (the MCP server card alongside it is committed)
10+
docs/public/.well-known/agent-skills/

docs/.gitignore

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
node_modules
12
dist
3+
.vocs
24
.env
3-
.env.*
5+
.env.*
6+
7+
# Vocs route manifest (generated at dev/build)
8+
src/pages.gen.ts
9+
10+
# Generated by scripts/gen-agent-skills-index.ts (the MCP server card alongside it is committed)
11+
public/.well-known/agent-skills/

docs/package.json

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,9 @@
44
"description": "Documentation for scaffold-ui components",
55
"type": "module",
66
"scripts": {
7-
"dev": "vocs dev",
8-
"build": "pnpm --filter @scaffold-ui/hooks --filter @scaffold-ui/components --filter @scaffold-ui/debug-contracts run build && vocs build",
7+
"generate": "tsx scripts/generate.ts",
8+
"dev": "pnpm generate && vocs dev",
9+
"build": "pnpm --filter @scaffold-ui/hooks --filter @scaffold-ui/components --filter @scaffold-ui/debug-contracts run build && pnpm generate && vocs build",
910
"preview": "vocs preview",
1011
"format": "prettier --write ."
1112
},
@@ -21,15 +22,21 @@
2122
"@scaffold-ui/debug-contracts": "workspace:*",
2223
"@scaffold-ui/hooks": "workspace:*",
2324
"@tanstack/react-query": "^5.59.15",
24-
"@types/react": "^19",
25-
"@types/react-dom": "^19",
2625
"react": "^19.2.3",
2726
"react-dom": "^19.2.3",
2827
"viem": "^2.23.13",
29-
"vocs": "^1.0.13",
30-
"wagmi": "^2.14.15"
28+
"vocs": "^2.3.1",
29+
"wagmi": "^2.14.15",
30+
"waku": "^1.0.0-beta.3"
3131
},
3232
"devDependencies": {
33-
"prettier": "^3.5.3"
33+
"@types/node": "^22",
34+
"@types/react": "^19",
35+
"@types/react-dom": "^19",
36+
"@vitejs/plugin-react": "^6",
37+
"prettier": "^3.5.3",
38+
"tsx": "^4",
39+
"typescript": "^5",
40+
"vite": "^8"
3441
}
3542
}
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
{
2+
"name": "io.scaffoldeth.ui",
3+
"title": "Scaffold-UI Docs",
4+
"description": "MCP server for the Scaffold-UI documentation. Lets AI clients list, read, and search the docs.",
5+
"version": "1.0.0",
6+
"websiteUrl": "https://ui.scaffoldeth.io",
7+
"repository": {
8+
"url": "https://github.com/scaffold-eth/scaffold-ui",
9+
"source": "github"
10+
},
11+
"serverInfo": {
12+
"name": "vocs",
13+
"version": "1.0.0"
14+
},
15+
"transport": {
16+
"type": "streamable-http",
17+
"endpoint": "https://ui.scaffoldeth.io/api/mcp"
18+
},
19+
"capabilities": {
20+
"tools": true,
21+
"resources": false,
22+
"prompts": false
23+
},
24+
"remotes": [
25+
{
26+
"type": "streamable-http",
27+
"url": "https://ui.scaffoldeth.io/api/mcp"
28+
}
29+
]
30+
}

docs/public/robots.txt

Lines changed: 2 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -1,67 +1,8 @@
1-
# Scaffold UI documentation is open-source and intended to be
2-
# discoverable by search engines and AI agents. Crawl freely.
1+
# Scaffold-UI documentation is open-source and meant to be discoverable
2+
# by search engines and AI agents. Crawl freely.
33

44
User-agent: *
55
Allow: /
66
Content-Signal: ai-train=yes, search=yes, ai-input=yes
77

8-
# AI training and search crawlers — explicitly allowed so agents can
9-
# index Scaffold UI components, hooks, and recipes.
10-
User-agent: GPTBot
11-
Allow: /
12-
13-
User-agent: ChatGPT-User
14-
Allow: /
15-
16-
User-agent: OAI-SearchBot
17-
Allow: /
18-
19-
User-agent: ClaudeBot
20-
Allow: /
21-
22-
User-agent: Claude-SearchBot
23-
Allow: /
24-
25-
User-agent: Claude-User
26-
Allow: /
27-
28-
User-agent: anthropic-ai
29-
Allow: /
30-
31-
User-agent: PerplexityBot
32-
Allow: /
33-
34-
User-agent: Perplexity-User
35-
Allow: /
36-
37-
User-agent: Google-Extended
38-
Allow: /
39-
40-
User-agent: Googlebot
41-
Allow: /
42-
43-
User-agent: Applebot
44-
Allow: /
45-
46-
User-agent: Applebot-Extended
47-
Allow: /
48-
49-
User-agent: CCBot
50-
Allow: /
51-
52-
User-agent: Bytespider
53-
Allow: /
54-
55-
User-agent: Meta-ExternalAgent
56-
Allow: /
57-
58-
User-agent: FacebookBot
59-
Allow: /
60-
61-
User-agent: cohere-ai
62-
Allow: /
63-
64-
User-agent: MistralAI-User
65-
Allow: /
66-
678
Sitemap: https://ui.scaffoldeth.io/sitemap.xml

docs/scripts/gen-sitemap.ts

Lines changed: 0 additions & 93 deletions
This file was deleted.

docs/scripts/generate.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
import { generateAgentSkillsIndex } from "./gen-agent-skills-index";
2+
3+
// Runs before `vocs dev` / `vocs build` (see package.json). Builds the
4+
// agent-skills discovery index that lives at /.well-known/agent-skills/index.json.
5+
// Vocs v2 emits sitemap.xml / robots.txt / llms.txt natively, so the old
6+
// gen-sitemap step is gone.
7+
generateAgentSkillsIndex();
File renamed without changes.

0 commit comments

Comments
 (0)