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?
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 generate
to generate the new blog without your deleted post
4. Run hexo deploy
to deploy your blog
Alternatively you can use the hexo-admin plugin.
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.
You can delete the files under source/_post folder.
For question 2. It depends on which repo you are using.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With