项目初始化

TIP

初始化

  1. 新建文件夹命名未: xxxx_blog
  2. cd xxxx_blog 执行 yarn init
  3. 安装依赖 yarn add -D vuepress@next
  4. 新建 package.json 文件,添加运行打包脚本
{
  "scripts": {
    "dev": "vuepress dev docs",
    "build": "vuepress build docs"
  }
}
  1. 在项目根目录新建 .gitignore 文件,将默认的临时目录和缓存目录添加到 .gitignore 文件中
node_modules
.temp
.cache
  1. 创建第一篇文章
mkdir docs
echo '# Hello VuePress' > docs/README.md
  1. 运行项目
yarn dev