【解决办法】hexo部署博客出现WARN No layout: about/index.html【fluid主题】

本文描述了在使用Hexo博客时遇到的bug,涉及到_config.yml文件错误、theme文件夹异常以及渲染器问题。作者提到通过验证_config.yml和theme设置,发现是由于安装的fluid主题文件夹存在问题,解决方案是删除并重新安装主题。
摘要由CSDN通过智能技术生成

如题。hexo g时出现这个bug,且打开博客也是一片空白。因为我用的是fluid主题,不知道其他主题是否适用。

出现如下情况:

按照参考中给出的方法:

Things to check:

  1. validate ./_config.yml (https://yaml-online-parser.appspot.com/)
  2. verify ./_config.yml's theme: entry is a directory in ./themes
  3. verify ./themes/[themedir]/_config.yml is valid
  4. verify post's front matter is valid yml
  5. verify post's front matter layout: entry is a file (w/o extension) in ./themes/[themedir]/layout/[name]

If you make any changes to _config files, restart the hexo server.

If that doesn't work, check your renderer packages. I was using a broken pug plugin. Prefer:
npm install hexo-renderer-jade --save

我检查了我的theme文件夹。发现theme文件夹下有一个fluid文件夹,且该文件夹下有个_config.xml文件为空。(但我是用npm install --save hexo-theme-fluid方法安装的主题,不知道为什么会有。也许是我手动装过但忘记了)

解决办法

将fluid文件夹删除,重新在博客根目录下运行:

npm install --save hexo-theme-fluid

就解决了。如果hexo s本地正常显示,但hexo d后页面空白,请移步:【解决办法】hexo d博客时遇到页面空白无显示的现象

  • 4
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值