往常新增文章之后,直接hexo d -g
一键就发布了,然后去网站一看,啥也没有。就郁闷了。
因为目前https的证书也到期了,怀疑了好多点。
- nginx配置
因为看页面的状态是302,怀疑是nginx的配置问题,之前https证书到期,需要把443的监听去掉,修改了一些配置,所以首度怀疑是配置问题。但配置就那几行,排除这个点。 - _config.yml配置文件
网上很多说是_config.yml
的配置问题,这个我确实改了一处,就是把avartar从https://media.lvxiang.site/file/avatar.jpeg
改为了//media.lvxiang.site/file/avatar.jpeg
,然后改回去,重新hexo clean
&hexo d -g
,public
中的html还是空的。
PS:配置文件有问题可能会导致build失败 - hexo的版本
又怀疑是hexo的版本问题,虽然都是3+,但不妨一试,使用了package
中的3.7版本试了一下,还是不行 - - - node版本
接着运行hexo s --debug
,然后打开网站,发现日志中有一些warning:
(node:37667) Warning: Accessing non-existent property 'lineno' of module exports inside circular dependency
(Use `node --trace-warnings ...` to show where the warning was created)
(node:37667) Warning: Accessing non-existent property 'column' of module exports inside circular dependency
(node:37667) Warning: Accessing non-existent property 'filename' of module exports inside circular dependency
(node:37667) Warning: Accessing non-existent property 'lineno' of module exports inside circular dependency
(node:37667) Warning: Accessing non-existent property 'column' of module exports inside circular dependency
(node:37667) Warning: Accessing non-existent property 'filename' of module exports inside circular dependency
(node:37667) Warning: Accessing non-existent property 'lineno' of module exports inside circular dependency
(node:37667) Warning: Accessing non-existent property 'column' of module exports inside circular dependency
(node:37667) Warning: Accessing non-existent property 'filename' of module exports inside circular dependency
(node:37667) Warning: Accessing non-existent property 'lineno' of module exports inside circular dependency
(node:37667) Warning: Accessing non-existent property 'column' of module exports inside circular dependency
(node:37667) Warning: Accessing non-existent property 'filename' of module exports inside circular dependency
查了一下相关issue
然后nvm下了一个12+的版本,重新build,结果html有内容了!!!
证书到期了,懒得搞了,个人博客地址如下:
http://blog.lvxiang.site/