diff --git a/example-site/templates/latest_post.html b/example-site/templates/latest_post.html new file mode 100644 index 0000000..0d57eec --- /dev/null +++ b/example-site/templates/latest_post.html @@ -0,0 +1,4 @@ +{% extends "base.html" %} +{% block content %} +{% include "partials/post.html" %} +{% endblock content %} \ No newline at end of file diff --git a/src/site.rs b/src/site.rs index 0c5623f..e41f367 100644 --- a/src/site.rs +++ b/src/site.rs @@ -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 {