trigger site rebuild after new user registration so profile pages exist immediately

This commit is contained in:
Davide Scaini
2026-04-11 14:17:42 +02:00
parent 5de9967127
commit 0b569b727c
2 changed files with 6 additions and 2 deletions
+3
View File
@@ -380,6 +380,9 @@ async def register(request: Request) -> JSONResponse:
from bincio.render.cli import _write_root_manifest
_write_root_manifest(dd)
# Rebuild site so the new user's profile pages exist immediately
_trigger_rebuild(handle)
token = create_session(_get_db(), handle)
resp = JSONResponse({"ok": True, "handle": handle})
_set_session_cookie(resp, token)
+3 -2
View File
@@ -264,9 +264,10 @@ server {
try_files $uri $uri/ /activity/index.html;
}
# Per-user profile pages: same fallback for new users.
# Per-user profile pages: fall back to the home page while the background
# rebuild (triggered automatically on registration) completes.
location /u/ {
try_files $uri $uri/ =404;
try_files $uri $uri/ /index.html;
}
# Static files