From e4addc326081969b1ba205db0b626f8a2ebe6285 Mon Sep 17 00:00:00 2001 From: mythsman Date: Thu, 2 Nov 2023 17:09:25 +0800 Subject: [PATCH] fix --- index.js | 5 +++++ package.json | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/index.js b/index.js index 97c5bc9..7695835 100644 --- a/index.js +++ b/index.js @@ -80,6 +80,11 @@ hexo.extend.console.register('douban', 'Generate pages from douban', options, fu if (this.config.douban[type].path.startsWith("/")) { this.config.douban[type].path = this.config.douban[type].path.substr(1) } + + hexo.extend.generator.register(type, function (locals) { + locals.douban_type = type + return require(`./lib/generator`).call(this, locals) + }); }) const self = this; diff --git a/package.json b/package.json index 130aa1f..ae3183f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "hexo-douban", - "version": "2.2.5", + "version": "2.2.6", "description": "Generate douban pages of books , movies and games for Hexo.", "main": "index", "scripts": {},