summaryrefslogtreecommitdiff
path: root/configs/index-pages.ini
blob: bc428ce0edac02179cb5fd6de7667994567621d0 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
[year]
parent_path = /blog
key = '{.year:04d}'.format(item.publication_date)
template = blog-year-index.html
subindex = month

[year.fields]
date = this.children.first().publication_date.replace(month=1, day=1)
year = this.key|int
previous_year_page = site.get('/blog@index-pages/year/{:04d}'.format((this.key|int) - 1))
next_year_page = site.get('/blog@index-pages/year/{:04d}'.format((this.key|int) + 1))
first_year_page = index_pages('year')|sort(attribute='year')|first
last_year_page = index_pages('year')|sort(attribute='year')|last

[year.month]
key = '{.month:02d}'.format(item.publication_date)
template = blog-month-index.html

[year.month.fields]
# this.parent is the year-index page this month-index belongs to.
date = this.parent.date.replace(month=this.key|int)
year = this.parent.year
month = this.key|int