Skip to content

Commit dca416e

Browse files
jaysin586claude
andcommitted
feat(docs): add full docs pages, OG generation, live conversation demo
- Add mdsvex + shiki for docs with dual-theme syntax highlighting - Add DocsLayout with sidebar navigation and other-projects - Create 7 docs pages: Getting Started, SvelteVirtualChat API, Props Reference, Imperative API, LLM Streaming Guide, History Loading Guide, Scroll Behavior Guide - Add /examples index page with card grid - Replace single-message demo with looping 5-question conversation - Add OG social card generation via docs-kit - Add sitemap:watch and social:watch to mprocs - Fix API Reference button, dead links, fetchOtherProjects error handling - Update icon to green chat bubble, fix theme-color Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent e6ceb73 commit dca416e

22 files changed

Lines changed: 2041 additions & 134 deletions

File tree

docs/package.json

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,18 @@
44
"private": true,
55
"type": "module",
66
"scripts": {
7-
"build": "vite build",
7+
"build": "node ./scripts/generate-sitemap-manifest.mjs && tsx ./scripts/generate-social-cards.ts && vite build",
88
"cf-typegen": "wrangler types && mv worker-configuration.d.ts src/",
99
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
1010
"deploy": "npm run build && wrangler deploy",
1111
"dev": "vite dev",
1212
"format": "prettier --write .",
13+
"generate-social": "tsx ./scripts/generate-social-cards.ts",
1314
"lint": "prettier --check . && eslint .",
1415
"preview": "vite preview",
15-
"sitemap:manifest": "node ./scripts/generate-sitemap-manifest.mjs"
16+
"sitemap:manifest": "node ./scripts/generate-sitemap-manifest.mjs",
17+
"sitemap:watch": "chokidar 'src/routes/**/*.svelte' 'src/routes/**/*.svx' 'src/routes/**/*.md' -c 'node ./scripts/generate-sitemap-manifest.mjs' --initial --silent",
18+
"social:watch": "chokidar 'src/lib/components/shared-link/OG.svelte' 'scripts/generate-social-cards.ts' -c 'tsx ./scripts/generate-social-cards.ts' --initial --silent"
1619
},
1720
"dependencies": {
1821
"@humanspeak/docs-kit": "github:humanspeak/docs-kit#2026.3.31",
@@ -27,14 +30,18 @@
2730
"@sveltejs/vite-plugin-svelte": "^7.0.0",
2831
"@tailwindcss/typography": "^0.5.19",
2932
"@tailwindcss/vite": "^4.2.2",
33+
"chokidar-cli": "^3.0.0",
3034
"eslint": "^10.2.0",
35+
"mdsvex": "^0.12.7",
3136
"mode-watcher": "^1.1.0",
3237
"prettier": "^3.8.2",
3338
"prettier-plugin-svelte": "^3.5.1",
3439
"prettier-plugin-tailwindcss": "^0.7.2",
40+
"shiki": "^4.0.2",
3541
"svelte": "^5.55.4",
3642
"svelte-check": "^4.4.6",
3743
"tailwindcss": "^4.2.2",
44+
"tsx": "^4.21.0",
3845
"typescript": "^6.0.2",
3946
"vite": "^8.0.8",
4047
"wrangler": "^4.82.2"
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
import { generateSocialCards } from '@humanspeak/docs-kit/scripts/generate-social-cards'
2+
import path from 'path'
3+
import { fileURLToPath } from 'url'
4+
import { docsConfig } from '../src/lib/docs-config'
5+
6+
const __dirname = path.dirname(fileURLToPath(import.meta.url))
7+
const ROOT = path.resolve(__dirname, '..')
8+
9+
await generateSocialCards({
10+
npmPackage: docsConfig.npmPackage,
11+
defaultTitle: docsConfig.name,
12+
defaultDescription:
13+
'A high-performance virtual chat viewport for Svelte 5. Follow-bottom, streaming-stable, history-aware.',
14+
defaultFeatures: docsConfig.defaultFeatures,
15+
rootDir: ROOT,
16+
fontsDir: path.join(ROOT, 'node_modules/@humanspeak/docs-kit/dist/fonts')
17+
})

docs/src/app.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<head>
44
<meta charset="utf-8" />
55
<meta name="viewport" content="width=device-width, initial-scale=1" />
6-
<meta name="theme-color" content="#6366f1" />
6+
<meta name="theme-color" content="#3dbba0" />
77
%sveltekit.head%
88
</head>
99
<body data-sveltekit-preload-data="hover">

docs/src/lib/assets/logo.svg

Lines changed: 1 addition & 1 deletion
Loading
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<script lang="ts">
2+
import { OG } from '@humanspeak/docs-kit'
3+
import { docsConfig } from '$lib/docs-config'
4+
5+
const {
6+
type = 'og',
7+
url,
8+
title,
9+
description,
10+
features
11+
}: {
12+
type: 'og' | 'twitter'
13+
url: string
14+
title?: string
15+
description?: string
16+
features?: string[]
17+
} = $props()
18+
</script>
19+
20+
<OG {type} {url} config={docsConfig} {title} {description} {features} />

docs/src/lib/docsNav.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import type { Breadcrumb, NavSection } from '@humanspeak/docs-kit'
22
import {
33
BookOpen,
4-
Box,
54
Code,
65
Gauge,
76
History,
@@ -46,10 +45,7 @@ export const docsSections: NavSection[] = [
4645
{
4746
title: 'Get Started',
4847
icon: Rocket,
49-
items: [
50-
{ title: 'Getting Started', href: '/docs/getting-started', icon: Rocket },
51-
{ title: 'Installation', href: '/docs/installation', icon: Box }
52-
]
48+
items: [{ title: 'Getting Started', href: '/docs/getting-started', icon: Rocket }]
5349
},
5450
{
5551
title: 'API Reference',

0 commit comments

Comments
 (0)