go to the blog folder. e.g. C:\Users\v-yuczh\Documents\GitHub\hexo-blog
1
npm install
Create a new post
1
hexo new "XXXXXXX"
Turn up local server
1
hexo server
You can view your website locally at http://localhost:4000, you can check your new post locally.
Deploy to prod
1
hexo deploy
Commit the changes to git
1 2 3
git add git commit -m "" git push
Or Use hexo-deployer-git
1
npm install hexo-deployer-git --save
1
hexo clean && hexo deploy
you have to use clean && deploy together. hexo deploy is not working anymore. to deploy and commit to git at the same time. However, this will commit to https://github.com/yuchaozh/yuchaozh.github.io project, not the hexo-blog project. So you still need to commit to hexo-blog afater use the above command.