mirror of
https://github.com/jerryc127/hexo-theme-butterfly.git
synced 2026-04-17 04:40:53 +08:00
12 lines
417 B
Plaintext
12 lines
417 B
Plaintext
mixin articleSort(posts)
|
|
.article-sort
|
|
- var year
|
|
- posts.each(function (article) {
|
|
- var tempYear = date(article.date, 'YYYY')
|
|
if tempYear !== year
|
|
- year = tempYear
|
|
.article-sort-item.year= year
|
|
.article-sort-item
|
|
time.article-sort-item__time= date(article.date)
|
|
a.article-sort-item__title(href=url_for(article.path))= article.title || 'No Title'
|
|
- }) |