You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
A page keeps one canonical slug and can have up to 10 long-lived, removable aliases in the same URL namespace. Serving is serve-direct: routes::serve falls back to Db::get_page_by_alias on a canonical miss and serves the canonical page's R2 content under its <slug>/ prefix — no redirect, no second copy, and a real page always wins over an alias of the same name. - migrations: new `aliases` table + idx_aliases_slug (schema.sql + idempotent 0003-aliases.sql). - db.rs: get_page_by_alias, insert_alias (NameTaken on collision), delete_alias (page-scoped), list/count/delete-for-page, alias_exists. - api.rs: POST /api/pages/:slug/aliases (can_upload + owner-or-admin) and DELETE /api/pages/:slug/aliases/:alias (owner-or-admin); create_page rejects a name held by an alias; delete_page removes a page's aliases; GET /api/pages returns each page's aliases[]. - Namespace uniqueness across pages.slug + aliases.alias is enforced in the handlers (SQLite can't express the cross-table rule). - Frontend: alias chips (× to remove) + an "Add alias" button. Replaces the earlier rename+conditional-redirect idea (dropped for 301-cache fragility). No R2 or behavioral change to existing pages. 196 unit + 20 doctests, both-target clippy clean. Bean: pages-9lsk. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> |
1 day ago | |
|---|---|---|
| .. | ||
| api.rs | 1 day ago | |
| auth.rs | 1 week ago | |
| mod.rs | 1 day ago | |
| serve.rs | 1 day ago | |