add: littleweb base

This commit is contained in:
trisua 2025-07-07 14:45:30 -04:00
parent 07a23f505b
commit c4de17058b
20 changed files with 457 additions and 8 deletions

View file

@ -46,3 +46,14 @@ pub fn routes(config: &Config) -> Router {
// pages
.merge(pages::routes())
}
/// These routes are only used when you provide the `LITTLEWEB` environment variable.
///
/// These routes are NOT for editing. These routes are only for viewing littleweb sites.
pub fn lw_routes() -> Router {
Router::new()
// api
.nest("/api/v1", api::v1::lw_routes())
// pages
.merge(pages::lw_routes())
}