The most common operations when you want to edit your blog

How to delete your blog articles

  1. Go to your local “source/_post” folder, find and delete the “.md” file that you want to delete.

  2. Go to the Git Bash and execute the following commands in turn

    1
    2
    hexo g
    hexo d

How to create and post a new article or new Page to your website

  1. Go to your local blog folder and open the Git Bash here. Execute the following command:

    1
    hexo new [layout] <title>

    [layout] : we can use post, page and draft, If you just want to post a new article, post is used usually.

  2. Go to your local folder and find the markdown file(.md) which has the title you just set up.

    If you use post layout, you should go to “source/_posts” folder.

    If you use page layout, you should go to “source” folder.

    If you use draft layout, you should go to “source/drafts” folder.

    Note: After you finish your draft, you can use the following command to move your draft to the “source/_posts” folder

    1
    hexo publish [layout] <title>
  3. Open and edit it. After that, open the Git Bash and execute the following commands in turn:

    1
    2
    hexo g
    hexo s
  4. Well Done! Now you can preview your post on your local site.

  5. If everything is ok for you, finally you should execute the following commands to publish your post to your remote site:

    1
    hexo clean && hexo g && hexo d