diff --git a/package.json b/package.json index c006c55a..cd153366 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "hexo-seo", - "version": "1.4.2", + "version": "1.4.3", "description": "Automated Seo Optimizer For Hexo", "main": "index.js", "types": "dist/src/index.d.ts", @@ -39,7 +39,9 @@ "seo" ], "engines": { - "node": ">=18", + "node": ">=18" + }, + "peerDependencies": { "hexo": ">=6.3.0" }, "author": { diff --git a/release/hexo-seo.tgz b/release/hexo-seo.tgz index 6c6953ba..b5471fdb 100644 Binary files a/release/hexo-seo.tgz and b/release/hexo-seo.tgz differ diff --git a/release/metadata.json b/release/metadata.json index 4acf4192..4c71fd67 100644 --- a/release/metadata.json +++ b/release/metadata.json @@ -28,12 +28,12 @@ }, "/release/hexo-seo.tgz": { "integrity": { - "sha1": "b3b489837cf0abd5edf7fde28e7b6cabcab03fc9", - "sha256": "zohLpgwEgpnGc4jKg5vjS3+qPghQlyxmVl97bP5ZBMU=", - "md5": "0c976bff4c7dc5649cb514a92f739c2f", - "sha512": "fjJ0edXDziXo5a9kW8ZEAKmZ3/WWjiV54HcYHIvZopdJIfUbvO1y1QGaCMfC4hx0nbv3+6UjOn1ttvEFt893pQ==" + "sha1": "0661ca662e6cd98d89aaf1bdacfb0d88922babcf", + "sha256": "P3iPgp1NZIH0jh1Fmf3RTrFJ+Z357sKFsIz1OwK+8II=", + "md5": "9b01a06ab9c8f7016823ce770a681b73", + "sha512": "uRs2PzFS/yaWcXOZ2zzYVmI16h9uGMuUx0pptPXCPda77ZN7jIlQJmQOFv76LiMsV0Fzk6Yi+GR9eGNVwEAq0A==" }, - "size": "432.52 KB" + "size": "432.57 KB" }, "/package-lock.json": { "integrity": { @@ -64,12 +64,12 @@ }, "/yarn.lock": { "integrity": { - "sha1": "e446bc8303e82ea2d6f8bb7795eb27dce3e4b5ac", - "sha256": "QRcxhXrESF7zNYFfzgm9taQ+O3/0Nwdam+Bt/u66slM=", - "md5": "3b703b80677204dca9386e07682646f5", - "sha512": "/X7rWTCq3Xh0UPe6wMTY+4Yz09nOIRHZwpjzW3kACUhLhe2LhffL3vWcLaKST8yWJSM36WFJ7s7F9k6UjP9LlA==" + "sha1": "50591e1fdf4a6a5219bab013a97ea352ea540735", + "sha256": "AentbJjUYLsjJGYF3pL+7P/yLIFXYV6oKsC5z7bp/qk=", + "md5": "2b2e32ac08edc0702652fba21600545a", + "sha512": "3p2LC2FttlXUiVRcLdUmFeYyHrUnxyMgc6MXYxrcAl1rGIQYZyLIzRusidDylr7YE/kZuLe/Ob+WM5D3kLwyEA==" }, - "size": "455.34 KB" + "size": "455.38 KB" }, "/release/hexo-seo-1.1.6.tgz": { "integrity": { @@ -169,5 +169,14 @@ "sha512": "fjJ0edXDziXo5a9kW8ZEAKmZ3/WWjiV54HcYHIvZopdJIfUbvO1y1QGaCMfC4hx0nbv3+6UjOn1ttvEFt893pQ==" }, "size": "432.52 KB" + }, + "/release/hexo-seo-1.4.3.tgz": { + "integrity": { + "sha1": "0661ca662e6cd98d89aaf1bdacfb0d88922babcf", + "sha256": "P3iPgp1NZIH0jh1Fmf3RTrFJ+Z357sKFsIz1OwK+8II=", + "md5": "9b01a06ab9c8f7016823ce770a681b73", + "sha512": "uRs2PzFS/yaWcXOZ2zzYVmI16h9uGMuUx0pptPXCPda77ZN7jIlQJmQOFv76LiMsV0Fzk6Yi+GR9eGNVwEAq0A==" + }, + "size": "432.57 KB" } } \ No newline at end of file diff --git a/release/readme.md b/release/readme.md index 1e01d350..6651544c 100644 --- a/release/readme.md +++ b/release/readme.md @@ -2,7 +2,7 @@ ## Releases | version | tarball url | | :--- | :--- | -| latest | https://github.com/dimaslanjaka/hexo-seo/raw/a46b0be/release/hexo-seo.tgz | +| latest | https://github.com/dimaslanjaka/hexo-seo/raw/8c814eb/release/hexo-seo.tgz | | latest | https://github.com/dimaslanjaka/hexo-seo/raw/pre-release/release/hexo-seo.tgz | use this tarball with `resolutions`: diff --git a/src/hexo-seo.ts b/src/hexo-seo.ts index c2ba0dfb..458d31a8 100644 --- a/src/hexo-seo.ts +++ b/src/hexo-seo.ts @@ -10,6 +10,7 @@ import { buildFolder, tmpFolder } from './fm'; import HexoSeoHtml from './html'; import HexoSeoCss from './minifier/css'; import HexoSeoJs from './minifier/js'; +import { StoreFunction } from 'hexo/dist/extend/renderer-d'; const argv = minimist(process.argv.slice(2)); @@ -98,14 +99,14 @@ export default function HexoSeo(hexo: Hexo) { if (config.js && config.js.enable) { // minify javascripts - hexo.extend.filter.register('after_render:js', HexoSeoJs); + hexo.extend.filter.register('after_render:js', HexoSeoJs as StoreFunction); } if (config.css && config.css.enable) { // minify css - hexo.extend.filter.register('after_render:css', HexoSeoCss); + hexo.extend.filter.register('after_render:css', HexoSeoCss as StoreFunction); } if (config.html && config.html.enable) { // all in one html fixer - hexo.extend.filter.register('after_render:html', HexoSeoHtml); + hexo.extend.filter.register('after_render:html', HexoSeoHtml as StoreFunction); } } diff --git a/src/html/index.ts b/src/html/index.ts index 478cdf55..02f66284 100644 --- a/src/html/index.ts +++ b/src/html/index.ts @@ -20,6 +20,7 @@ import { identifyRels } from './fixHyperlinks.static'; import fixSchemaStatic from './fixSchema.static'; import { HexoSeo } from './schema/article'; import { isExternal } from './types'; +import { StoreFunctionData } from 'hexo/dist/extend/renderer-d'; /** * get page full source @@ -204,7 +205,7 @@ export default async function HexoSeoHtml(this: Hexo, content: string, data: Hex const sources = originalSources.filter(fs.existsSync); if (sources.length > 0) { try { - const rendered = await hexo.render.render({ path: sources[0], engine: 'js' }); + const rendered = await hexo.render.render({ path: sources[0], engine: 'js' } as StoreFunctionData); // push src addScript(rendered); } catch (e) {