- bincio_wiki/pages/ — new home for all wiki content (2 wiki pages + _docs/ with 13 docs pages), tracked by the
container repo - bincio_wiki/blog/ — new home for all blog content - site/src/content.config.ts — base: '../pages' (was ./src/content/entries) - site/astro.config.mjs — added vite.server.fs.allow: ['..'] so Vite serves files from outside the project root; updated the delete watcher to watch ../pages/ - edit/server.py — default WIKI_PAGES_DIR is now pages (was site/src/content/entries) Content is now versioned in bincio_wiki. The submodule stays clean — it's just the engine.
This commit is contained in:
@@ -4,14 +4,16 @@
|
||||
|
||||
A private wiki for the bincio group of friends. Built on Astro 6 using the
|
||||
`brutsalvadi/astro-bloomz` fork as a git submodule at `site/`. Content lives
|
||||
in `pages/` at the repo root, symlinked into `site/src/content/entries/_wiki`.
|
||||
in `pages/` and `blog/` at the repo root; Astro loads them via glob loaders
|
||||
pointing to `../pages` and `../blog` (outside the submodule). No symlinks.
|
||||
|
||||
## Directory layout
|
||||
|
||||
```
|
||||
bincio_wiki/
|
||||
pages/ wiki content (*.md files the community edits)
|
||||
_docs/ software documentation (moved here, shown as separate section)
|
||||
_docs/ software documentation (shown as separate section)
|
||||
blog/ blog/stories content (*.md files)
|
||||
site/ Astro 6 app (git submodule → brutsalvadi/astro-bloomz)
|
||||
edit/ FastAPI edit server (Python, port 8001)
|
||||
pyproject.toml Python dependencies (managed by uv)
|
||||
@@ -36,6 +38,7 @@ by `dev.sh --edit` — no manual setup needed. To add a dependency:
|
||||
- Wiki pages: `pages/*.md` (IDs in Astro content store are the bare filename
|
||||
without extension, e.g. `digital-garden`)
|
||||
- Docs section: `pages/_docs/*.md` (IDs start with `_docs/`)
|
||||
- Blog/stories: `blog/*.md`
|
||||
- Bonsai index: stored in `site/src/content/index/` — the `i.bonsai.md` file
|
||||
defines the semantic tree structure
|
||||
- The homepage (`site/src/pages/index.astro`) splits entries by `_docs/` prefix
|
||||
@@ -44,10 +47,13 @@ by `dev.sh --edit` — no manual setup needed. To add a dependency:
|
||||
## Astro 6 content layer notes
|
||||
|
||||
- Collections use glob loaders in `site/src/content.config.ts`
|
||||
- Custom `generateId` on the `entries` collection strips `_wiki/` prefix
|
||||
- Custom `generateId` on the `index` collection preserves dots (Astro 6's
|
||||
default `generateId` applies `githubSlug()` which strips them — `i.bonsai`
|
||||
would become `ibonsai`, breaking semtree lookup)
|
||||
- `entries` collection base is `../pages` (relative to `site/`), resolving to
|
||||
`bincio_wiki/pages/`. Vite is configured with `server.fs.allow: ['..']` to
|
||||
permit serving files from outside the project root.
|
||||
- `blog` collection base is `../blog` (same pattern)
|
||||
- `index` collection base is `./src/content/index` (stays inside `site/`)
|
||||
- Custom `generateId` on `entries` and `index` — see `content.config.ts` for
|
||||
details. `index` preserves dots so `i.bonsai` is not mangled by githubSlug.
|
||||
- Use `entry.id` not `entry.slug`
|
||||
- Use `import { render } from 'astro:content'; render(entry)` not `entry.render()`
|
||||
|
||||
|
||||
Reference in New Issue
Block a user