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: front/scripts/README.md
+30-4Lines changed: 30 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,8 +15,9 @@ for troubleshooting or surgical edits.
15
15
16
16
| Script | npm alias | Purpose |
17
17
|---|---|---|
18
-
|`sync.py`|`sync` / `sync:fast` / `sync:check`|**Main entry point.** Clean orphans → validate Mermaid → optimize images → generate EN+ES audio → upload to R2 → rebuild blog data |
19
-
|`build-blog-data.js`| (auto via `prebuild`) | Scan `public/blog/posts/` and emit `src/data/blogData.json`|
18
+
|`sync.py`|`sync` / `sync:fast` / `sync:check`|**Main entry point.** Clean orphans → validate Mermaid → optimize images → generate EN+ES audio → upload to R2 → rebuild blog data + knowledge base |
19
+
|`build-blog-data.js`|`build-blog-data` (auto via `prebuild`) | Scan `public/blog/posts/` and emit `src/data/blogData.json`|
20
+
|`build-knowledge-base.js`|`build-knowledge-base` (auto via `prebuild`) | Derive `knowledge-base/posts.json` (machine-queryable post index) and re-inject the auto-catalog into `knowledge-base/KNOWLEDGE_BASE.md`. Consumed by agents — see repo-root `CLAUDE.md`|
| 6 | Spanish audio | Auto-starts `ollama serve` if needed; if Ollama isn't installed, **warns and skips** instead of failing. Hash cache applies |
53
54
| 7 | Upload to R2 | Pushes new/changed MP3s to the Cloudflare R2 bucket. Skipped with a warning if no credentials are configured. See § R2 setup below |
54
-
| 8 | Rebuild blog data | Writes `src/data/blogData.json` with absolute audio URLs (if `AUDIO_BASE_URL_*` set) so local `npm start` sees the fresh state|
55
+
| 8 | Rebuild blog data and knowledge base | Writes `src/data/blogData.json` with absolute audio URLs (if `AUDIO_BASE_URL_*` set), then runs `build-knowledge-base.js` to regenerate `knowledge-base/posts.json` and re-inject the auto-catalog into `knowledge-base/KNOWLEDGE_BASE.md`. Both are kept in lockstep with the posts on disk|
55
56
56
57
Steps 1–3 run in `--check`. All eight run in the full pipeline.
0 commit comments