Hexo provides some useful hook
functions to manipulate the posts before or after rendering the posts. For the image caption, the operation can be processed in the after_post_render
callback in which the caption is added after each image tag when the post is rendered. Just a few lines of code:
1 | hexo.extend.filter.register('after_post_render', function(data) { |