summaryrefslogtreecommitdiff
path: root/main.py
diff options
context:
space:
mode:
Diffstat (limited to 'main.py')
-rw-r--r--main.py14
1 files changed, 14 insertions, 0 deletions
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")