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.

Workflow

Create a new post

1
$ hexo new "post title"

That will create a markdown file named by your title, and an image folder which has the same name in sub directory source\_posts\

Write blog

Put your categories and tags in your markdown file.
Write the article after < !-- more -- >.
To insert the image in your blog, put the image file in the image folder

  • Insert image: ![](your image.png)

Run server

1
$ hexo s --draft

That will allow you to preview your blog including draft post in local website: http://localhost:4000/

More info: Server

Move draft blog to post folder

1
$ hexo publish "post-title"

You can run this command when you finish your draft blog, and you want to publish it.

Note: When the blog is put into the post folder, you change remove the “-“ in your title.

Generate static files

1
2
$ hexo clean
$ hexo g

That will clean and generate your released file in folder .deploy_git

More info: Generating

Deploy source code to your Github Repository

In the Hexo branch
1
2
3
$ git add .
$ git commit -m "comment"
$ git push origin Hexo

Deploy to remote sites

1
$ hexo d

More info: Deployment