修改主题配置文件

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

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

修改footer.pug

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

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文件