3

How can I rename published post in hexo?

Currently, I am deleting existing post and creating the new one by copying contains from an old post.

is there any better way of doing this?

Niraj Sonawane
  • 10,225
  • 10
  • 75
  • 104

2 Answers2

3

Besides deleting a post and recreating it as you mentioned, you can also rename the posts filename, title inside of the YAML header, and asset folders.

You can also use the hexo-console-renamer plugin. Using this, change the title of the post inside of the YAML header. Then, run

hexo rename source/_post/some_post_with_wrong_file_name.md

Rubydesic
  • 3,386
  • 12
  • 27
1
  1. Rename the post
  2. Run hexo clean
  3. Run hexo generate
  4. Run hexo deploy
Arghya Sadhu
  • 41,002
  • 9
  • 78
  • 107
Mark H
  • 11
  • 2