add separate template for the "latest post" page (the home/main page)

since it's reasonable to assume some may want to customize this a
little differently than the normal post page.
This commit is contained in:
Gered 2023-07-01 16:19:22 -04:00
parent b8200b220d
commit 2d9ce75ec0
2 changed files with 5 additions and 1 deletions

View file

@ -0,0 +1,4 @@
{% extends "base.html" %}
{% block content %}
{% include "partials/post.html" %}
{% endblock content %}

View file

@ -343,7 +343,7 @@ impl SiteService {
if let Some(post) = post {
context.insert("post", post);
}
HttpResponse::Ok().body(self.template_renderer.render("post.html", &context).unwrap())
HttpResponse::Ok().body(self.template_renderer.render("latest_post.html", &context).unwrap())
}
pub fn serve_posts_by_tag(&self, tag: &Tag) -> HttpResponse {