往常新增文章之後,直接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/