irongit

Git hosting and a container registry in one Rust binary (axum + Astro)

Route /docs/* to the static pages

huncholanehuncholaneauthored
parent cf03afbcommit 7f2479d176082ce593efe9d85fe6c60ba6e3bef2Browse files

1 file changed, +3 -1

+3-1backend/src/routes.rs
@@ -31,7 +31,9 @@ pub fn router(state: AppState) -> Router {
3131 .merge(git_http::router())
3232 .merge(lfs::router())
3333 .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));
3537
3638 #[cfg(feature = "hot-reload")]
3739 let app = app.route("/dev-ws", get(crate::dev::ws_handler));