Skip to content

Commit

Permalink
1.5.1 重大变更
Browse files Browse the repository at this point in the history
  【CDN】默认CDN改为第三方由cbd.int提供,主要js本地驱动,可自行修改cdn选项
  • Loading branch information
anzhiyu-c committed Jul 27, 2023
1 parent d659371 commit cdbf4a6
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
8 changes: 4 additions & 4 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1195,13 +1195,13 @@ inject:
# 非必要请不要修改
CDN:
# The CDN provider of internal scripts (主题内部 js 的 cdn 配置)
# option: local/elemecdn/jsdelivr/unpkg/cdnjs/custom
# option: local/elemecdn/jsdelivr/unpkg/cdnjs/onmicrosoft/cbd/custom
# Dev version can only choose. ( dev版的主题只能设置为 local )
internal_provider: onmicrosoft
internal_provider: local

# The CDN provider of third party scripts (第三方 js 的 cdn 配置)
# option: elemecdn/jsdelivr/unpkg/cdnjs/custom
third_party_provider: onmicrosoft
# option: elemecdn/jsdelivr/unpkg/cdnjs/onmicrosoft/cbd/custom
third_party_provider: cbd

# Add version number to CDN, true or false
version: true
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "hexo-theme-anzhiyu",
"version": "1.5.0",
"version": "1.5.1",
"description": "A Simple and Card UI Design theme for Hexo",
"main": "package.json",
"scripts": {
Expand Down
1 change: 1 addition & 0 deletions scripts/events/cdn.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ hexo.extend.filter.register("before_generate", () => {
cdnjs: `https://cdnjs.cloudflare.com/ajax/libs/${cdnjs_name}/${version}/${min_cdnjs_file}`,
elemecdn: `https://npm.elemecdn.com/${name}${verType}/${file}`,
onmicrosoft: `https://npm.onmicrosoft.cn/${name}${verType}/${file}`,
cbd: `https://cdn.cbd.int/${name}${verType}/${file}`,
custom: (CDN.custom_format || "").replace(/\$\{(.+?)\}/g, (match, $1) => value[$1]),
};

Expand Down

0 comments on commit cdbf4a6

Please sign in to comment.