Events

  • 2018-12-03

Hexo inherits from EventEmitter. Use the on method to listen for events emitted by Hexo, and use the emit method to emit events. For more information, refer to the Node.js API documentation.

deployBefore

Emitted before deployment begins.

deployAfter

Emitted after deployment finishes.

exit

Emitted before Hexo exits.

generateBefore

Emitted before generation begins.

generateAfter

Emitted after generation finishes.

new

Emitted after a new post has been created. This event returns the post data:

1
2
3
hexo.on('new', function(post){
//
});
Data Description
post.path Full path of the post file
post.content Content of the post file

processBefore

Emitted before processing begins. This event returns a path representing the root directory of the box.

processAfter

Emitted after processing finishes. This event returns a path representing the root directory of the box.

ready

Emitted after initialization finishes.

扫码领红包

2018双11超级红包
PC访问链接: 2018双11超级红包 预售开启 汇聚全球潮流新品

淘口令:¥20Y0b6q4eHR¥ (复制此行再打开手机淘宝客访问)

最后更新: 2018年12月03日 09:29

原始链接: https://cyc.oy99.com/api/events.html

× 多少都行~
打赏二维码
×
  • {title}