-
Notifications
You must be signed in to change notification settings - Fork 0
/
archive.jade
39 lines (35 loc) · 1.06 KB
/
archive.jade
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
extends base
total_posts = get_posts(limit=300, sort='desc')
if request.args.use == 'tags'
entries = group(total_posts, 'tags')
elif request.args.use == 'categories'
entries = group(total_posts, 'metadata:category')
else
entries = group(total_posts, 'date:year+month', reverse=True)
block blog_main
for year, posts in entries
if request.args.use == 'tags'
a(href="/tags/{{year}}")= year
elif request.args.use == 'categories'
a(href="/categories/{{year}}")= year
else
a(href="/date/{{year[0]}}/{{year[1]}}")
{{year[0]}}年{{year[1]}}月
ul
for post in posts
li.post_item
span.date
[{{post.date | date("%Y-%m-%d") }}]
if request.args.use != 'categories'
span.category
a(href="/categories/{{post.metadata.category}}")
分类:{{post.metadata.category}}
span.title
a(href="{{ post.url }}")= post.title
for tag in post.tags
span.tag_item
a(href="/tags/{{tag}}")= tag
span.visit_count
访问量:{{ post.visits or 0 }}
block blog_sidebar
include include/tag_cloud_count