Welcome to Hexo! This is your very first post. Check documentation for more info. If you get any problems when using Hexo, you can find the answer in troubleshooting or you can ask me on GitHub.


快速入门

创建页面

hexo new "xxx"

创建带文件夹页面

hexo new page "xxx"

删除之前生成的文件,若未生成过静态文件,可忽略此命令

hexo clean

生成静态文章,可以用 hexo g 缩写

hexo generate

部署文章,可以用 hexo d 缩写

hexo deploy

快速发布

hexo clean && hexo generate && hexo deploy 

添加代码到本地

git add .

提交到本地

git commit -m backup 

推送到主分支

git push -u origin master

重装Hexo

安装Hexo

npm install -g hexo-cli

安装 hexo

参考教程: https://www.fomal.cc/posts/e593433d.html

npm install hexo-cli -g
hexo init blog-demo(项目名)
cd blog-demo //进入blog-demo文件夹
npm i
npm install hexo-deployer-git --save

安装 butterfly主题

npm i hexo-theme-butterfly
npm install hexo-renderer-pug hexo-renderer-stylus --save

安装 本地搜索

npm install hexo-generator-search --save

安装 文章加密

npm install --save hexo-blog-encrypt

语法

Markdown语法:https://forum-zh.obsidian.md/t/topic/435