hexo博客突然丢失了所有的css js??
我这个博客使用Github Pages + hexo + next主题,昨天提交一篇博客之后就跪了,看不见文章列表,控制台里发现所有在vendor目录下的css和js全部404。纠结了一下午终于在github上找到了这个问题的issue
We recently updated to Jekyll v3.3, which ignores the vendor folder by default. If you’re not using Jekyll, you can add a .nojekyll file to the root of your repository to disable Jekyll from building your site. Once you do that, your site should build with your vendor folder.
原来是github最近升级了Jekyll,升级之后会默认忽略vendor/vendors文件夹。。这个会直接影响到next主题的显示。
目前找到了这么几种解决办法:
- 官方给出的解决办法就是在根目录下添加一个
.nojekyll文件,对于hexo的话需要在.deploy_git和public目录下添加,然后hexo d即可。 - 更新next主题,作者已提交针对此问题的更新。
- 手动将
source/vendors目录修改成source/lib或者其他的名称;同时,修改下主题配置文件_config.yml, 将_internal: vendors改成你所修改的名字
相关链接: