Git hosting and a container registry in one Rust binary (axum + Astro)
Route /docs/* to the static pages
1 file changed, +3 -1
+3-1backend/src/routes.rs
| @@ -31,7 +31,9 @@ pub fn router(state: AppState) -> Router { | ||
| 31 | 31 | .merge(git_http::router()) |
| 32 | 32 | .merge(lfs::router()) |
| 33 | 33 | .merge(web::router()) |
| 34 | - .route("/_astro/{*path}", get(frontend::serve)); | |
| 34 | + .route("/_astro/{*path}", get(frontend::serve)) | |
| 35 | + // Static docs would otherwise match /{owner}/{repo}; "docs" is a reserved name. | |
| 36 | + .route("/docs/{*path}", get(frontend::serve)); | |
| 35 | 37 | |
| 36 | 38 | #[cfg(feature = "hot-reload")] |
| 37 | 39 | let app = app.route("/dev-ws", get(crate::dev::ws_handler)); |