我的想法很简单,就是想用flatpages + markdown来生成文章页面。现在就是想在index页面有个文章列表,这个列表上可以展示一下文章的前面部分一段内容。当时想着可以在网页里面设置一个标记,标记部分就可以做为介绍,放到index页面上。不过感觉这种方法笨笨的,不知道有没有更好的方法?
业精于勤,荒于嬉;行成于思,毁于随。
I searched for information on the Internet and found that it can be done using the filter in Jinja2: {{ post.html|truncate(250) }}The first 250 characters can be intercepted and used as a summary.
{{ post.html|truncate(250) }}
I searched for information on the Internet and found that it can be done using the filter in Jinja2:
{{ post.html|truncate(250) }}
The first 250 characters can be intercepted and used as a summary.