From d163092b5c159ddd1813550d1f9bab72adbdf80a Mon Sep 17 00:00:00 2001 From: altaf-creator Date: Fri, 31 Jul 2026 20:57:25 +0800 Subject: index and blog is now ssr --- main.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'main.py') diff --git a/main.py b/main.py index 23f201f..78074cc 100644 --- a/main.py +++ b/main.py @@ -138,4 +138,18 @@ def event_page_redirect(event_name: str): ) +@app.get("/") +def index_page(): + status, html = pages.render_index() + + return fastapi.responses.Response(content=html, media_type="text/html", status_code=status) + + +@app.get("/blog/") +def bloglist_page(): + status, html = pages.render_blog_list() + + return fastapi.responses.Response(content=html, media_type="text/html", status_code=status) + + app.mount("/", fastapi.staticfiles.StaticFiles(directory="./www/", html=True), name="static") -- cgit v1.2.3