The most common operations when you want to edit your blog
How to delete your blog articles
Go to your local “source/_post” folder, find and delete the “.md” file that you want to delete.
Go to the Git Bash and execute the following commands in turn
1
2hexo g
hexo d
How to create and post a new article or new Page to your website
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
anddraft
, If you just want to post a new article,post
is used usually.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>
Open and edit it. After that, open the Git Bash and execute the following commands in turn:
1
2hexo g
hexo sWell Done! Now you can preview your post on your local site.
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