建立博客
- 在gitee中
npm install @vuepress-reco/theme-cli -g #插件安装
theme-cli init blogname #项目初始化
cd blogname
cnpm install #安装依赖
- gitee新建仓库,仓库名选择git账号名(这样就不用在config.js中修改base)
npm run dev // 本地运行
npm run build // 建立client端与server端
-
将项目上传到gitee
-
编写自动提交脚本
#!/bin/bash
git status
read -r -p "是否继续提交? [Y/n] " input
case $input in
[yY][eE][sS]|[yY])
echo "继续提交"
git add -A
git commit -m "shell提交"
git push origin master
exit 1
;;
[nN][oO]|[nN])
echo "中断提交"
exit 1
;;
*)
echo "输入错误,请重新输入"
;;
esac
常见问题整理:
解决system limit for number of file watchers reached 问题:
linux系统中限制了用户可以watch文件变更的最大数,因此需要通过sysctl.conf进行更改数值
echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p