距离上次更新已经过了 956 天,文章所描述的内容可能已经发生变化,请留意。

修改主题配置文件

在主题配置文件_config.butterfly.yml 中,找到 footer: 增加以下代码:

yml
1
2
3
4
footer:
and:
url: /love/
icon: fas fa-heartbeat

修改 footer.pug

修改 [you_blog]\themes\butterfly\layout\includes\footer.pug 文件中以下内为:

diff
1
2
3
4
5
6
7
8
-if theme.footer.owner.since && theme.footer.owner.since != nowYear
- .copyright!= `©${theme.footer.owner.since} - ${nowYear} By ${config.author}`
-else
- .copyright!= `©${nowYear} By ${config.author}`
+if theme.footer.owner.since && theme.footer.owner.since != nowYear
+ .copyright!= `&copy;${theme.footer.owner.since} - ${nowYear} <a href="${theme.footer.and.url}" target="_blank" one-link-mark="yes">&nbsp;<i class="${theme.footer.and.icon}"></i>&nbsp;</a> ${config.author}`
+else
+ .copyright!= `&copy;${nowYear} <a href="${theme.footer.and.url}" target="_blank" one-link-mark="yes">&nbsp;<i class="${theme.footer.and.icon}"></i>&nbsp;</a> ${config.author}`
03 - 友链卡片样式 01 - 添加自定义 css 和 js 文件