hexo博客发布文章出现问题?

发布于 2022-09-04 23:11:32 字数 12203 浏览 31 评论 0

写了一篇《明天会更好》》的md文章后hexo g和hexo d后网站上没了,还有一篇网站也没了,只剩下初始的“helloworld”,问题截图及代码报错如下,求教大佬。
图片描述

图片描述

图片描述

图片描述

代码报错如下:

$ hexo g
INFO  Start processing
ERROR Process failed: _posts/明天会更好.md
YAMLException: can not read a block mapping entry; a multiline key may not be an implicit key at line 4, column 1:

    ^
    at generateError (D:\Blog\node_modules\js-yaml\lib\js-yaml\loader.js:162:10)
    at throwError (D:\Blog\node_modules\js-yaml\lib\js-yaml\loader.js:168:9)
    at readBlockMapping (D:\Blog\node_modules\js-yaml\lib\js-yaml\loader.js:1045:9)
    at composeNode (D:\Blog\node_modules\js-yaml\lib\js-yaml\loader.js:1331:12)
    at readDocument (D:\Blog\node_modules\js-yaml\lib\js-yaml\loader.js:1493:3)
    at loadDocuments (D:\Blog\node_modules\js-yaml\lib\js-yaml\loader.js:1549:5)
    at Object.load (D:\Blog\node_modules\js-yaml\lib\js-yaml\loader.js:1566:19)
    at parseYAML (D:\Blog\node_modules\hexo-front-matter\lib\front_matter.js:80:21)
    at parse (D:\Blog\node_modules\hexo-front-matter\lib\front_matter.js:56:12)
    at D:\Blog\node_modules\hexo\lib\plugins\processor\post.js:52:18
    at tryCatcher (D:\Blog\node_modules\bluebird\js\release\util.js:16:23)
    at Promise._settlePromiseFromHandler (D:\Blog\node_modules\bluebird\js\release\promise.js:509:35)
    at Promise._settlePromise (D:\Blog\node_modules\bluebird\js\release\promise.js:569:18)
    at Promise._settlePromise0 (D:\Blog\node_modules\bluebird\js\release\promise.js:614:10)
    at Promise._settlePromises (D:\Blog\node_modules\bluebird\js\release\promise.js:693:18)
    at Promise._fulfill (D:\Blog\node_modules\bluebird\js\release\promise.js:638:18)
    at PromiseArray._resolve (D:\Blog\node_modules\bluebird\js\release\promise_array.js:126:19)
    at PromiseArray._promiseFulfilled (D:\Blog\node_modules\bluebird\js\release\promise_array.js:144:14)
    at PromiseArray._iterate (D:\Blog\node_modules\bluebird\js\release\promise_array.js:114:31)
    at PromiseArray.init [as _init] (D:\Blog\node_modules\bluebird\js\release\promise_array.js:78:10)
    at Promise._settlePromise (D:\Blog\node_modules\bluebird\js\release\promise.js:566:21)
    at Promise._settlePromise0 (D:\Blog\node_modules\bluebird\js\release\promise.js:614:10)
    at Promise._settlePromises (D:\Blog\node_modules\bluebird\js\release\promise.js:693:18)
    at Promise._fulfill (D:\Blog\node_modules\bluebird\js\release\promise.js:638:18)
    at PromiseArray._resolve (D:\Blog\node_modules\bluebird\js\release\promise_array.js:126:19)
    at PromiseArray._promiseFulfilled (D:\Blog\node_modules\bluebird\js\release\promise_array.js:144:14)
    at Promise._settlePromise (D:\Blog\node_modules\bluebird\js\release\promise.js:574:26)
INFO  Files loaded in 921 ms
INFO  Generated: archives/index.html
INFO  Generated: archives/2017/index.html
INFO  Generated: index.html
INFO  Generated: archives/2017/04/index.html
INFO  Generated: about/index.html
INFO  Generated: 2017/04/09/hello-world/index.html
INFO  6 files generated in 504 ms

Jhard@DESKTOP-VRQSHDK MINGW64 /d/Blog
$ hexo d
INFO  Deploying: git
INFO  Clearing .deploy_git folder...
INFO  Copying files from public folder...
warning: LF will be replaced by CRLF in 2017/04/09/hello-world/index.html.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in 2017/04/09/post-title/index.html.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in 2017/04/09/你好,五月/index.html.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in 2017/05/09/明天会更好/index.html.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in about/index.html.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in archives/2017/04/index.html.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in archives/2017/05/index.html.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in archives/2017/index.html.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in archives/index.html.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in css/main.css.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in index.html.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in js/src/affix.js.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in js/src/algolia-search.js.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in js/src/bootstrap.js.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in js/src/exturl.js.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in js/src/hook-duoshuo.js.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in js/src/js.cookie.js.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in js/src/motion.js.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in js/src/post-details.js.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in js/src/schemes/pisces.js.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in js/src/scroll-cookie.js.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in js/src/scrollspy.js.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in js/src/utils.js.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in lib/Han/dist/han.css.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in lib/Han/dist/han.js.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in lib/Han/dist/han.min.css.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in lib/Han/dist/han.min.js.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in lib/algolia-instant-search/instantsearch.min.js.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in lib/canvas-ribbon/canvas-ribbon.js.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in lib/fancybox/source/helpers/jquery.fancybox-buttons.css.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in lib/fancybox/source/helpers/jquery.fancybox-buttons.js.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in lib/fancybox/source/helpers/jquery.fancybox-media.js.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in lib/fancybox/source/helpers/jquery.fancybox-thumbs.css.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in lib/fancybox/source/helpers/jquery.fancybox-thumbs.js.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in lib/fancybox/source/jquery.fancybox.css.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in lib/fancybox/source/jquery.fancybox.js.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in lib/fancybox/source/jquery.fancybox.pack.js.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in lib/fastclick/README.html.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in lib/fastclick/lib/fastclick.js.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in lib/font-awesome/css/font-awesome.css.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in lib/font-awesome/css/font-awesome.min.css.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in lib/jquery/index.js.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in lib/jquery_lazyload/CONTRIBUTING.html.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in lib/jquery_lazyload/README.html.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in lib/jquery_lazyload/jquery.lazyload.js.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in lib/jquery_lazyload/jquery.scrollstop.js.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in lib/three/canvas_lines.min.js.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in lib/three/canvas_sphere.min.js.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in lib/three/three-waves.min.js.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in lib/three/three.min.js.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in lib/ua-parser-js/dist/ua-parser.min.js.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in lib/ua-parser-js/dist/ua-parser.pack.js.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in lib/velocity/velocity.js.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in lib/velocity/velocity.min.js.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in lib/velocity/velocity.ui.js.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in lib/velocity/velocity.ui.min.js.
The file will have its original line endings in your working directory.
On branch master
nothing to commit, working tree clean
Branch master set up to track remote branch master from https://github.com/Dream-bloom/Dream-bloom.github.io.git.
Everything up-to-date
INFO  Deploy done: git

弄了半天也不知为何,在这里求助大佬,麻烦了。

图片描述

那个url我改成我的域名了,还是没用啊
图片描述

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(5

注定孤独终老 2022-09-11 23:11:33

不不,搭建都搞错了。这个一个bug
我也碰到类似事情,我更新nodejs 版本 ,我下载版本是8.11.3,在我更新之前没有这个bug的,node版本我忘记了,大概6.0多左右版本

_posts/明天会更好.md

第4行,我猜一点是


tags://更新node自后这里也需要空格包括 photos,这是我更新node之前。没有空格当然没有注释,
photos:
 - /2018/07/03/vue项目搭建笔记/5aa8db481d851.png

这里首页图片和内容在我更新node版本之前和之后都ok的。 这个图片是不少主题说明文档中写法
但是更新之后必须严格按照yaml写法

---
title: vue项目搭建笔记
date: 2018-07-03 16:15:30
tags: 
photos: /2018/07/03/vue项目搭建笔记/5aa8db481d851.png
---
情泪▽动烟 2022-09-11 23:11:33

检查_config.yml内容,配置文件:_config.yml 中 # Site #URL 属性设置后面的:需要有空格再填写内容.看是不是这个原因

变身佩奇 2022-09-11 23:11:33

yaml 冒号后要加空格

じее 2022-09-11 23:11:33

hexo clean 然后再hexo g 最后发布下过一会儿看看 然后在你github博客仓库看看是否有对应的页面 如果有就是说仓库有 但是页面还是找不到 可能就需要hexo clean清除下本地的一些记录和静态文件 重新生成上传下 具体的问题我也不知道 我之前也这样过

紫罗兰の梦幻 2022-09-11 23:11:33

这个错误很明显啊,就是你_posts/明天会更好.md这个文件的第四行格式不规范,应该是没加空格,像title、date、tags这些冒号后一定要加一个空格

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文