hexo 標題特殊符號引起錯誤(冒號、引號、大括號)

上一篇文章標題有一個 json 字典,結果報錯了:html

ERROR Process failed: _posts/微信公衆號開發錯誤解決-發送模板消息.md
YAMLException: incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line at line 1, column 94:
     ... ot;:"data format error hint: [xrlw6a07614125]"} 發送模板消息 
                                         ^
    at generateError (/home/xxxxxxx/MyBlog/node_modules/js-yaml/lib/js-yaml/loader.js:167:10)
    at throwError (/home/xxxxxxx/MyBlog/node_modules/js-yaml/lib/js-yaml/loader.js:173:9)
    at readBlockMapping (/home/xxxxxxx/MyBlog/node_modules/js-yaml/lib/js-yaml/loader.js:1027:9)
    at composeNode (/home/xxxxxxx/MyBlog/node_modules/js-yaml/lib/js-yaml/loader.js:1359:12)
    at readDocument (/home/xxxxxxx/MyBlog/node_modules/js-yaml/lib/js-yaml/loader.js:1519:3)
    at loadDocuments (/home/xxxxxxx/MyBlog/node_modules/js-yaml/lib/js-yaml/loader.js:1575:5)
    at Object.load (/home/xxxxxxx/MyBlog/node_modules/js-yaml/lib/js-yaml/loader.js:1596:19)
    at parseYAML (/home/xxxxxxx/MyBlog/node_modules/hexo-front-matter/lib/front_matter.js:80:21)
    at parse (/home/xxxxxxx/MyBlog/node_modules/hexo-front-matter/lib/front_matter.js:56:12)
    at /home/xxxxxxx/MyBlog/node_modules/hexo/lib/plugins/processor/post.js:51:20
    at tryCatcher (/home/xxxxxxx/MyBlog/node_modules/bluebird/js/release/util.js:16:23)
    at Promise._settlePromiseFromHandler (/home/xxxxxxx/MyBlog/node_modules/bluebird/js/release/promise.js:509:35)
    at Promise._settlePromise (/home/xxxxxxx/MyBlog/node_modules/bluebird/js/release/promise.js:569:18)
    at Promise._settlePromise0 (/home/xxxxxxx/MyBlog/node_modules/bluebird/js/release/promise.js:614:10)
    at Promise._settlePromises (/home/xxxxxxx/MyBlog/node_modules/bluebird/js/release/promise.js:694:18)
    at Promise._fulfill (/home/xxxxxxx/MyBlog/node_modules/bluebird/js/release/promise.js:638:18)

hexo 標題中的特殊符號須要使用HTML字符實體代替:node

" "
[ [
] ] 
{ { 
} } 
: :

這個地方有個列表但不全,例如冒號就沒有。json

這裏更全。promise

歡迎來個人博客: https://codeplot.top/
個人博客hexo分類:https://codeplot.top/tags/hexo/微信

相關文章
相關標籤/搜索