yscoder / hexo-theme-indigo

一个Material Design风格的Hexo主题。 https://imys.net/    备用:
https://yscoder.github.io/
The Unlicense
2.79k stars 543 forks source link

样式表地址失效 #495

Closed cooture closed 4 years ago

cooture commented 4 years ago

无样式,浏览器报错,站点ranxb.com

Refused to execute http://unpkg.com/hexo-theme-material-indigo@latest/js/main.min.js as script because "X-Content-Type: nosniff" was given and its Content-Type is not a script MIME type.

scripts/plugins.js中一段代码改一下暂时能用。是仓库地址失效了么?

 const source = (path, cache, ext) => {
   if (!cache) {//改了这里,让他生成本地路径
         const minFile = `${path}${ext === '.js' ? '.min' : ''}${ext}`
         return hexo.theme.config.cdn ? `//unpkg.com/${name}@latest${minFile}` : `${minFile}?v=${version}`
    } else {
        return path + ext
    }
 }
cooture commented 4 years ago

已恢复