You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CLAUDE.md
+10-20Lines changed: 10 additions & 20 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -52,7 +52,7 @@ pnpm format # Format all files
52
52
53
53
### Content Flow
54
54
1.**Markdown → Database**: Content in `./content` is indexed into Turso via `scripts/index-content.ts`
55
-
2.**libsql-search**: Handles embedding generation (local/Gemini/OpenAI), vector storage, and semantic search
55
+
2.**libsql-search**: Handles embedding generation (local), vector storage, and semantic search
56
56
3.**Static Generation**: Article pages are pre-rendered at build time using `getStaticPaths()`
57
57
4.**Server Search**: Search API runs server-side at `/api/search.json` (requires `output: 'server'` with Node.js adapter)
58
58
@@ -73,29 +73,20 @@ pnpm format # Format all files
73
73
Optional in `.env`:
74
74
-`TURSO_DB_URL`: Turso database URL (libsql://...) - if not set, uses local libSQL file
75
75
-`TURSO_AUTH_TOKEN`: Turso authentication token - if not set, uses local libSQL file
76
-
-`EMBEDDING_PROVIDER`: "local" (default), "gemini", or "openai"
77
-
- Optional: `GEMINI_API_KEY` or `OPENAI_API_KEY` (if using cloud providers)
76
+
77
+
Embeddings run locally by default; no API keys are required.
78
78
79
79
**Local Development**: If Turso credentials aren't provided, the project automatically falls back to a local SQLite file (`local.db`) for database operations. This is useful for CI builds and local development without cloud dependencies.
80
80
81
81
## Critical Configuration
82
82
83
-
### Server-Side Rendering + Dual Adapter Support
83
+
### Server-Side Rendering + Node Adapter
84
84
The search API endpoint requires SSR with an adapter. The configuration uses:
A beautiful, dark-mode documentation theme powered by [libsql-search](https://github.com/llbbl/libsql-search) for semantic search capabilities. Perfect for technical documentation, knowledge bases, and content-heavy sites.
@@ -31,6 +33,16 @@ Or use as a template on GitHub.
31
33
pnpm install
32
34
```
33
35
36
+
Optional: use the `justfile` task runner for common commands:
37
+
38
+
```bash
39
+
just
40
+
just dev
41
+
just test
42
+
```
43
+
44
+
See `docs/just.md` for the full list of recipes.
45
+
34
46
### 3. Set Up Environment
35
47
36
48
Copy `.env.example` to `.env` and add your credentials:
@@ -44,7 +56,6 @@ Edit `.env`:
44
56
```env
45
57
TURSO_DB_URL=libsql://your-database.turso.io
46
58
TURSO_AUTH_TOKEN=your-auth-token
47
-
EMBEDDING_PROVIDER=local
48
59
```
49
60
50
61
**Get Turso credentials:**
@@ -130,21 +141,9 @@ const { title = "Your Site Name", description = "Your description" } = Astro.pro
130
141
131
142
Edit `src/styles/global.css` to change the color scheme. The theme uses OKLCH colors for smooth gradients and perceptual uniformity.
132
143
133
-
### Change Embedding Provider
134
-
135
-
**Use Gemini** (free tier: 1,500 requests/day):
136
-
137
-
```env
138
-
EMBEDDING_PROVIDER=gemini
139
-
GEMINI_API_KEY=your-key
140
-
```
141
-
142
-
**Use OpenAI** (paid):
144
+
### Embeddings
143
145
144
-
```env
145
-
EMBEDDING_PROVIDER=openai
146
-
OPENAI_API_KEY=your-key
147
-
```
146
+
Semantic search uses local embeddings by default, so no API keys are required.
148
147
149
148
## Project Structure
150
149
@@ -178,8 +177,6 @@ semantic-docs/
178
177
179
178
## Deployment
180
179
181
-
> **Note**: Cloudflare Workers/Pages deployment support is currently in development on the `cloudflare-workers` branch.
182
-
183
180
### Container-Based Platforms (Recommended)
184
181
185
182
This project is designed to run on platforms that support Docker containers, such as:
@@ -278,21 +275,14 @@ pnpm preview
278
275
279
276
First run downloads ~50MB model. Subsequent runs use cache.
0 commit comments