前言
如图,上面修改前,下面修改后。
实现
修改\themes\butterfly\layout\includes\mixins\article-sort.pug
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22.article-sort-item-info
.article-sort-item-time
time.post-meta-date-created(datetime=date_xml(article.date) title=_p('post.created') + ' ' + full_date(article.date))= date(article.date, config.date_format)
a.article-sort-item-title(href=url_for(article.path) title=title)= title
+ .article-meta-wrap
+ if (theme.post_meta.page.categories && article.categories.data.length > 0)
+ span.article-sort-item-categories
+ i.iconfont.icon-fenlei//- 记得改成自己的图标
+ each item, index in article.categories.data
+ a(href=url_for(item.path)).article-meta__categories #[=item.name]
+ if (index < article.categories.data.length - 1)
+ i.fas.fa-angle-right
+ if (theme.post_meta.page.tags && article.tags.data.length > 0)
+ span.article-sort-item-tags
+ i.iconfont.icon-biaoqian//- 记得改成自己的图标
+ each item, index in article.tags.data
+ a(href=url_for(item.path)).article-meta__tags #[=item.name]
+ if (index < article.tags.data.length - 1)
+ span.article-meta__link #[='•']
+ .article-sort-item-time
+ time.post-meta-date-created(datetime=date_xml(article.date) title=_p('post.created') + ' ' + full_date(article.date))= date(article.date, config.date_format)
增加css:根据自己的实际样式情况进行微调,没有通用css。