Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I delete a post in hexo

Tags:

hexo

I am using to write my blog, I meet a trouble that I can not delete a post in blog. I just find create a post in command, but I could not find the delete or drop command. How can I delete a post in properly? What command should I use?

In addition, I push the blog to page. When I delete a post, can the page be changed?

like image 241
hyyy Avatar asked Jan 12 '15 01:01

hyyy


3 Answers

There is no command to delete a post on Hexo, but follow this steps :
1. Delete the post under source/_post folder
2. Run hexo clean to delete the database (db.json) and assets folder
3. Run hexo generateto generate the new blog without your deleted post
4. Run hexo deploy to deploy your blog

Alternatively you can use the hexo-admin plugin.

like image 140
Louis Barranqueiro Avatar answered Nov 11 '22 15:11

Louis Barranqueiro


You can just go to your hexo path/source/_posts, delete the one you wanna delete.

Then run

hexo generate

hexo deploy

you will see that one has gone from your blog site.

like image 2
ronan Avatar answered Nov 11 '22 13:11

ronan


You can delete the files under source/_post folder.

For question 2. It depends on which repo you are using.

like image 1
MartinDlut Avatar answered Nov 11 '22 15:11

MartinDlut