changed the route from posts to post
parent
cbc88b34b8
commit
d8a4c2b03e
|
@ -102,7 +102,7 @@ fn show_post(title: String) -> Template {
|
||||||
|
|
||||||
context.insert("title", &title);
|
context.insert("title", &title);
|
||||||
context.insert("post", &post);
|
context.insert("post", &post);
|
||||||
Template::render("posts", context)
|
Template::render("post", context)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
{% for post in posts %}
|
{% for post in posts %}
|
||||||
<a class="article" href="/posts/{{ post.title | slugify }}-{{ post.id }}">
|
<a class="article" href="/post/{{ post.title | slugify }}-{{ post.id }}">
|
||||||
<article>
|
<article>
|
||||||
<span><strong>{ image: </strong></span>
|
<span><strong>{ image: </strong></span>
|
||||||
<figure>
|
<figure>
|
||||||
|
|
Loading…
Reference in New Issue