diff --git a/.gitignore b/.gitignore index 483cd46..603cfc5 100644 --- a/.gitignore +++ b/.gitignore @@ -10,4 +10,6 @@ wheels/ .venv .ruff_cache/ /pagerite/frontend-build -pagerite.kanta + +# Site +*.kantadb diff --git a/AGENTS.md b/AGENTS.md index b19b1ae..e78a8cc 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -20,8 +20,8 @@ not for the public pages. See `docs/design-principles.md` for the design. - Avoid running the server yourself, ask the user to test - `app.py` — the FastAPI app. FastAPI's built-in API docs are disabled (`docs_url`/`redoc_url`/`openapi_url=None`) because `/docs` belongs to - our content. Our own routes (content pages, `/_/api/...`, `/_/f/...`, - `/_/admin`) are registered BEFORE `frontend.route(app, "/")` is + our content. Our own routes (content pages, `/_api/...`, `/_f/...`, + `/_admin`) are registered BEFORE `frontend.route(app, "/")` is called: fastapi-vue inserts its file routes at the position where `route()` was called (during `load()` in the lifespan), so anything defined earlier wins. The one exception is the content catch-all @@ -29,7 +29,7 @@ not for the public pages. See `docs/design-principles.md` for the design. frontend assets still take priority over content slugs. The `Frontend` is constructed with `spa=False` explicitly: it only serves the built files without a catch-all. The build mirrors the URL space — hashed - immutable assets under `/_/assets/`, `favicon.ico` at the site root — + immutable assets under `/_assets/`, `favicon.ico` at the site root — and an `index.html` in the build would become a `/` route, so leave it out of the build to keep `/` ours. - `data.py` — msgspec Structs for the kanta database. The site structure @@ -49,15 +49,15 @@ not for the public pages. See `docs/design-principles.md` for the design. the `Data` object; reads are plain attribute access, writes in `kanta.transaction(...)`. `Data.files` is a content-addressed store (blake3[:12] + extension) - mapping file names to bytes, served at `/_/f/{name}` with immutable - caching; pages reference files by absolute `/_/f/` URLs so hierarchy + mapping file names to bytes, served at `/_f/{name}` with immutable + caching; pages reference files by absolute `/_f/` URLs so hierarchy moves never break them. `Node.banner` is a raw trusted HTML snippet for the header banner (img, styled div, canvas+script...); empty inherits from the node's ancestors (front page last), then the default banner.svg artwork. `Data.version` is bumped on every write and embedded in page ETags so nav-affecting changes invalidate caches. `Data.brand` is the site name (header link + `