Lets make the frontpage in markdown too
All checks were successful
Build, Push, and Deploy to Nomad / docker-nomad (push) Successful in 34s

This commit is contained in:
2024-12-24 00:50:24 +01:00
parent 6d7f365069
commit 4059d6d7be
2 changed files with 31 additions and 3 deletions

View File

@@ -48,10 +48,22 @@ class CategoryController:
Returns:
TemplateResponse: A rendered HTML page for the index (home) route.
"""
unix_time_now = int( time.time() )
with open(f"data/_frontpage/index.html", "r") as fp:
content = fp.read()
return self.templates.TemplateResponse(
"index.html",
{"request": request, "data": self.data, "page_title": "Forside", "author": "Henrik"},
)
"category.html",
{
"request": request,
"data": self.data,
"page_title": "Frontpage",
"author": "Henrik Jess",
"content": content,
"timestamp": unix_time_now
})
async def get_category(self, request: Request, category_name: str):
"""