diff options
| author | altaf-creator <dev@altafcreator.com> | 2026-07-31 20:57:25 +0800 |
|---|---|---|
| committer | altaf-creator <dev@altafcreator.com> | 2026-07-31 20:57:25 +0800 |
| commit | d163092b5c159ddd1813550d1f9bab72adbdf80a (patch) | |
| tree | d30657c2aa127a57ff58a267a502aa0e3f7378c6 /main.py | |
| parent | f1966a70cd5bdcb606c579d5146e26acfc1028fc (diff) | |
index and blog is now ssr
Diffstat (limited to 'main.py')
| -rw-r--r-- | main.py | 14 |
1 files changed, 14 insertions, 0 deletions
@@ -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") |
