How do I delete a post in hexo
Asked Answered
S

3

22

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?

Secretariat answered 12/1, 2015 at 1:39 Comment(0)
B
32

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.

Bitt answered 3/5, 2015 at 18:42 Comment(1)
make sure to scan the public folder for anything that should not be there before running clean. Someone may have stored assets there which will be deleted by cleanFahrenheit
V
2

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.

Villareal answered 27/1, 2015 at 6:53 Comment(0)
O
1

You can delete the files under source/_post folder.

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

Orleans answered 15/1, 2015 at 4:46 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.