mohのAI正在绞尽脑汁想思路ING···
mohのAI摘要
mohのAI-Lite

本文中的[blogRoot] 是指你博客的根目录

如何引用自定义的js

首先你要创建文件夹

1
[blogRoot]/source/js

示例:

创建文件

1
[blogRoot]/source/js/custom.js

[blogRoot]/_config.butterfly.yml中添加代码

1
2
3
4
5
6
7
8
9

# Inject
# Insert the code to head (before '</head>' tag) and the bottom (before '</body>' tag)
inject:
head:
bottom:
- <script defer src="/js/custom.js"></script>
- <script data-pjax type="text/javascript" src="/js/{把大括号里面的这个换成你的js名字}.js"></script

注意:

* 如果使用 pjax 建议加上 `data-pjax`

如何引用自定义的css

首先你要创建文件夹

1
[blogRoot]/source/css

示例:

创建文件

1
[blogRoot]/source/js/custom.css

[blogRoot]/_config.butterfly.yml中添加代码

1
2
3
4
5
6
7
8
9

# Inject
# Insert the code to head (before '</head>' tag) and the bottom (before '</body>' tag)
inject:
head:
- <script defer src="/js/custom.css"></script>
bottom:
- <script defer src="/js/custom.js"></script>

注意:

* 引用css一定要写在head,否侧可能会出现短暂无css