vuepress build提示YAMLException: end of the stream or a document separator is expected at line 7, colu

简介: vuepress build提示YAMLException: end of the stream or a document separator is expected at line 7, colu

1、问题

vuePress执行build操作的时候

vuepress build ~/my_blogs/docs/


错误提示如下

YAMLException: end of the stream or a document separator is expected at line 7, column 9:
    features:
            ^
    at generateError (/usr/lib/node_modules/vuepress/node_modules/js-yaml/lib/js-yaml/loader.js:167:10)
    at throwError (/usr/lib/node_modules/vuepress/node_modules/js-yaml/lib/js-yaml/loader.js:173:9)
    at readDocument (/usr/lib/node_modules/vuepress/node_modules/js-yaml/lib/js-yaml/loader.js:1545:5)
    at loadDocuments (/usr/lib/node_modules/vuepress/node_modules/js-yaml/lib/js-yaml/loader.js:1588:5)
    at load (/usr/lib/node_modules/vuepress/node_modules/js-yaml/lib/js-yaml/loader.js:1614:19)
    at Object.safeLoad (/usr/lib/node_modules/vuepress/node_modules/js-yaml/lib/js-yaml/loader.js:1637:10)
    at module.exports (/usr/lib/node_modules/vuepress/node_modules/gray-matter/lib/parse.js:12:17)
    at parseMatter (/usr/lib/node_modules/vuepress/node_modules/gray-matter/index.js:109:17)
    at Object.matter [as default] (/usr/lib/node_modules/vuepress/node_modules/gray-matter/index.js:50:10)
    at parseFrontmatter (/usr/lib/node_modules/vuepress/node_modules/@vuepress/shared-utils/lib/parseFrontmatter.js:8:33)
    at Page.process (/usr/lib/node_modules/vuepress/node_modules/@vuepress/core/lib/node/Page.js:106:44)
    at async App.addPage (/usr/lib/node_modules/vuepress/node_modules/@vuepress/core/lib/node/App.js:354:5)
    at async /usr/lib/node_modules/vuepress/node_modules/@vuepress/core/lib/node/App.js:339:7
    at async Promise.all (index 0)
    at async App.resolvePages (/usr/lib/node_modules/vuepress/node_modules/@vuepress/core/lib/node/App.js:337:5)
    at async App.process (/usr/lib/node_modules/vuepress/node_modules/@vuepress/core/lib/node/App.js:115:5)

2、原因

我的READMDE.md文件格式有问题

---
home:true
heroImage:/hero.png
heroText:Hero标题
tagline:Hero副标题
actionText:快速上手→
actionLink:/zh/guide/
features:
- title:简洁至上
  details:以Markdown为中心的项目结构,以最少的配置帮助你专注于写作。
- title:Vue驱动
  details:享受Vue+ webpack 的开发体验,在Markdown中使用Vue组件,同时可以使用Vue来开发自定义主题。
- title:高性能
  details:VuePress为每个页面预渲染生成静态的 HTML,同时在页面被加载的时候,将作为 SPA 运行。
footer: MIT Licensed|Copyright©2018-present EvanYou
---root@iZm5e6dk6exl71zbx327zvZ:~/my_blogs/docs# 

3、解决办法

:后面需要加上空格,修复后的README.md文件如下

---
home: true
heroText: Hero标题
tagline: Hero副标题
actionText: 快速上手→
actionLink: /README.md
features:
- title: 简洁至上
  details: 以Markdown为中心的项目结构,以最少的配置帮助你专注于写作。
- title: Vue驱动
  details: 享受Vue+ webpack 的开发体验,在Markdown中使用Vue组件,同时可以使用Vue来开发自定义主题。
- title: 高性能
  details: VuePress为每个页面预渲染生成静态的 HTML,同时在页面被加载的时候,将作为 SPA 运行。
footer: MIT Licensed|Copyright©2020-present 湘ICP备 20001035号
---


相关文章
|
6月前
|
编译器 C语言
__FILE__, __LINE__ __FUNCTION__
__FILE__, __LINE__ __FUNCTION__
|
8月前
|
JavaScript
ESLint Parsing error: control-character-in-input-stream vue/no-parsing-error
ESLint Parsing error: control-character-in-input-stream vue/no-parsing-error
93 0
|
Java
IDEA 启动服务报错:Command line is too long. Shorten the command line via JAR manifest or via a classpath file and rerun 解决方案
IDEA 启动服务报错:Command line is too long. Shorten the command line via JAR manifest or via a classpath file and rerun 解决方案
1417 1
Could not find com.serenegiant:common:4.1.1
Could not find com.serenegiant:common:4.1.1
193 0
|
TensorFlow 算法框架/工具 Python
成功解决File "frozen importlib._bootstrap", line 219, in _call_with_frames_removed ImportError: DLL lo
成功解决File "frozen importlib._bootstrap", line 219, in _call_with_frames_removed ImportError: DLL lo
成功解决File "frozen importlib._bootstrap", line 219, in _call_with_frames_removed ImportError: DLL lo
|
JSON 数据格式 索引
Elastic:doc[‘field‘].value与params._source[‘field‘]的区别;doc循环依赖问题
今天有同学问到doc['field'].value与params._source['field']用法的区别,起因在于下述的一道题的解法上,下面详细讲述下我的看法
158 0
Elastic:doc[‘field‘].value与params._source[‘field‘]的区别;doc循环依赖问题
Cannot find source code based button in SE24
When you are logging on to customer system for incident handling, you want to switch to source code to perform some keyword search. However, you could not find button “Source code based builder” in toolbar, with following warning message: ———————————————— 版权声明:本文为CSDN博主「汪子熙」的原创文章,遵循CC 4.0 BY-SA版权协
Cannot find source code based button in SE24
OPA 15 - find existing item by its type.note
Created by Wang, Jerry, last modified on Nov 08, 2015
124 0
OPA 15 - find existing item by its type.note
Cannot find source code based button in SE24 - modification assistant
Cannot find source code based button in SE24 - modification assistant
123 0
|
算法
On the Correct and Complete Enumeration of the Core Search Space
在之前的文章中我们讨论了基于graph的DP-based算法,来解决join ordering的枚举问题。 这些DP算法通过join predicate描述的连通性,解决了枚举可能的表组合问题,但join graph本身(即使hypergraph)是无法完整的描述join语义的,因为连通边本身无法描述不同类型的join语义,例如left outer join/semi join/anti join...,因此即使找到了所谓的csg-cmp-pair,也不一定是有效的plan。 这篇paper讨论的就是这个问题,当枚举出一个csg-cmp-pair (S1 o S2),如何判断这是有效的join
372 0
On the Correct and Complete Enumeration of the Core Search Space