This post is only about several commands that will be used during updating this blog.

Hexo related commands:

1
2
3
npm install hexo -g #install Hexo
npm update hexo -g #update Hexo
hexo init #initialize a new blog

Blog related commands:
1
2
3
4
hexo n "我的博客" == hexo new "我的博客" #create a new post
hexo g == hexo generate #Generate the blog
hexo s == hexo server #start preview webserver
hexo d == hexo deploy # deploy to remote server i.e Github

Preview server related commands:
1
2
3
4
5
hexo server #Hexo will monitor the changes to files and update by itself. No need to reboot the server
hexo server -s #static mode
hexo server -p 5000 #change port
hexo server -i 192.168.1.1 #set ip address
hexo clean #clean cache