Closed
Description
在“Implementing the blog engine”这部分。
blog.mustache这个文件中有:
<h2 class="article-title"><a href="/article/{{id}}">{{title}}</a></h2>
然而在后面给出的RenderedArticle代码里面,不存在id这个字段。在github里面blog.mustache的代码则是
<h2 class="article-title"><a href="/article/{{slug}}">{{title}}</a></h2>
其次,blog.mustache和header.mustache文件中都引用了{{title}},但是在HtmlController中却是:
@GetMapping("/") fun blog(model: Model): String { model["articles"] = repository.findAllByOrderByAddedAtDesc().map { it.render() } return "blog" }
没有title。
Metadata
Metadata
Assignees
Labels
No labels