0%

next新版本自定义样式(hexo)

更新到最新版的 next主题我们发现自定义的 css 样式位置发生了改变。

第一步

打开主题配置文件

1
2
3
4
5
6
7
8
9
10
11
custom_file_path:
# head: source/_data/head.swig
#header: source/_data/header.swig
#sidebar: source/_data/sidebar.swig
#postMeta: source/_data/post-meta.swig
#postBodyEnd: source/_data/post-body-end.swig
#footer: source/_data/footer.swig
#bodyEnd: source/_data/body-end.swig
#variable: source/_data/variables.styl
#mixin: source/_data/mixins.styl
#style: source/_data/custom.styl

发现了这段代码,我们把style: source/_data/custom.styl取消注释

第二部

在博客的根目录下创建文件,路径为
myblog/source/_data/custom.styl
这里其实发现只要和主题配置文件的路径一致就行,文件名可以自己更改。然后在里面就可以写自定义样式了。

本文标题:next新版本自定义样式(hexo)

文章作者:志者

发布时间:2019年08月28日 - 16:50:00

最后更新:2019年08月28日 - 17:33:45

原始链接:http://witman1999.github.io/next新版本自定义样式.html

许可协议: 署名-非商业性使用-相同方式共享 4.0 国际 转载请保留原文链接及作者。

-------------本文结束感谢您的阅读-------------
copy