How to use before_post_render filter #4879
-
I put
in hexoroot\script\test.js. But the console only shows
The title of posts not changes and seems before_post_render not worked |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
However, if you are going to change the title of the post, |
Beta Was this translation helpful? Give feedback.
-
@lisongyuan99 Please try |
Beta Was this translation helpful? Give feedback.
@lisongyuan99
I assume it is caused by the cache. Hexo has the cache (
db.json
).The
before_post_render
is perhaps trigger once after change a post.Please try
hexo clean
if you want to triggerbefore_post_render
without change a post. (Also, you can delete it manually)