Skip to content

Commit ecdb73c

Browse files
committed
feat: bump version to 1.0.25
1 parent 9ff3bef commit ecdb73c

File tree

3 files changed

+17
-3
lines changed

3 files changed

+17
-3
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Changelog
22

3+
## [1.0.25] - 2023-1-25
4+
5+
### Bug Fixes
6+
7+
- Add cutom CDN url.
8+
39
## [1.0.24] - 2023-12-14
410

511
### Bug Fixes

index.js

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,18 @@ const {
1414
highlight_lang,
1515
highlight_height_limit,
1616
is_highlight_shrink,
17+
css_cdn,
18+
js_cdn,
1719
copy: { success, error, no_support } = {},
1820
} = config;
1921
const codeblockTheme = themes.has(theme) ? theme : "one-dark-pro";
2022
const css = hexo.extend.helper.get("css").bind(hexo);
2123
const js = hexo.extend.helper.get("js").bind(hexo);
2224
hexo.extend.injector.register("head_end", () => {
23-
return css("https://unpkg.com/hexo-shiki-plugin@latest/lib/codeblock.css");
25+
return css(
26+
css_cdn ||
27+
"https://cdn.jsdelivr.net/npm/hexo-shiki-plugin@latest/lib/codeblock.css"
28+
);
2429
});
2530
hexo.extend.injector.register("head_end", () => {
2631
return themes.get(codeblockTheme);
@@ -41,7 +46,10 @@ if (config.highlight_height_limit) {
4146

4247
if (beautify) {
4348
hexo.extend.injector.register("body_end", () => {
44-
return js("https://unpkg.com/hexo-shiki-plugin@latest/lib/codeblock.js");
49+
return js(
50+
js_cdn ||
51+
"https://cdn.jsdelivr.net/npm/hexo-shiki-plugin@latest/lib/codeblock.js"
52+
);
4553
});
4654
}
4755
hexo.extend.injector.register("body_end", () => {

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "hexo-shiki-plugin",
3-
"version": "1.0.24",
3+
"version": "1.0.25",
44
"description": "A beautiful hexo code block highlight plugin based on shiki",
55
"author": "nova1751",
66
"license": "MIT",

0 commit comments

Comments
 (0)