从头开始,搭建vuepress 1.0 blog详细步骤
2023/10/19小于 1 分钟
从头开始,搭建vuepress 1.0 blog详细步骤
根据步骤一步一步搭建,一定没问题的.
安装
// 创建文件夹 进入文件夹路径
mkdir blog && cd blog
// 安装 vuepress 框架
yarn add vuepress -D
// 安装主题
yarn add vuepress-theme-meteorlxy -D此时得到的文件路径
blog
node-modeules
package.json
yarn.lock创建目录
blog
_posts // 博客文章存储的地址
2023-10-19-第一章博客.md
.vuepress // 对vuepress的一些配置
config.js
node-modeules
package.json
yarn.lock配置 .vuepress 文件夹下的 config.js
module.exports = {
title: 'VuePress Blog Example', // Title for the site. This will be displayed in the navbar.
theme: 'vuepress-theme-meteorlxy',
themeConfig: {
// Please keep looking down to see the available options.
}
}配置 package.json
{
"scripts": {
"dev": "vuepress dev",
"build": "vuepress build"
},
}运行
yarn dev