From d8a4c2b03ee26dc015f101c50de112d36290f8cc Mon Sep 17 00:00:00 2001 From: kirbylife Date: Mon, 18 Nov 2019 02:15:46 -0600 Subject: [PATCH] changed the route from posts to post --- src/main.rs | 2 +- templates/index.html.tera | 2 +- templates/{posts.html.tera => post.html.tera} | 0 3 files changed, 2 insertions(+), 2 deletions(-) rename templates/{posts.html.tera => post.html.tera} (100%) diff --git a/src/main.rs b/src/main.rs index 7446fa7..d0b92a6 100644 --- a/src/main.rs +++ b/src/main.rs @@ -102,7 +102,7 @@ fn show_post(title: String) -> Template { context.insert("title", &title); context.insert("post", &post); - Template::render("posts", context) + Template::render("post", context) } fn main() { diff --git a/templates/index.html.tera b/templates/index.html.tera index a747989..617f4e6 100644 --- a/templates/index.html.tera +++ b/templates/index.html.tera @@ -6,7 +6,7 @@ {% block content %} {% for post in posts %} - +
{ image:
diff --git a/templates/posts.html.tera b/templates/post.html.tera similarity index 100% rename from templates/posts.html.tera rename to templates/post.html.tera