Skip to content

Commit

Permalink
fix: 修復 CDN 的 internal_provider 設為 jsdelivr 時,主題的 js 無法加載的 bug
Browse files Browse the repository at this point in the history
  • Loading branch information
jerryc127 committed Apr 10, 2023
1 parent 8d5ca45 commit 496234c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
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-butterfly",
"version": "4.8.0",
"version": "4.8.1",
"description": "A Simple and Card UI Design theme for Hexo",
"main": "package.json",
"scripts": {
Expand Down
3 changes: 1 addition & 2 deletions scripts/events/cdn.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,11 @@ hexo.extend.filter.register('before_generate', () => {
const createCDNLink = (data, type, cond = '') => {
Object.keys(data).forEach(key => {
let { name, version, file, other_name } = data[key]

const min_file = minFile(file)
const cdnjs_name = other_name || name
const cdnjs_file = file.replace(/^[lib|dist]*\/|browser\//g, '')
const min_cdnjs_file = minFile(cdnjs_file)
if (cond === 'internal') file = `source/${file}`
const min_file = minFile(file)
const verType = CDN.version ? (type === 'local' ? `?v=${version}` : `@${version}`) : ''

const value = {
Expand Down

0 comments on commit 496234c

Please sign in to comment.