Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] 禁用了 CDN 后 waline.mjs 仍然走 CDN #247

Closed
3 tasks done
lolifamily opened this issue Sep 28, 2023 · 2 comments
Closed
3 tasks done

[BUG] 禁用了 CDN 后 waline.mjs 仍然走 CDN #247

lolifamily opened this issue Sep 28, 2023 · 2 comments
Labels
bug Something isn't working dev:finished Development in dev branch completed. Please wait for the new version to release priority:high It will be completed right away

Comments

@lolifamily
Copy link

lolifamily commented Sep 28, 2023

提交前检查单

Bug 描述
禁用了 CDN 后 waline.mjs 仍然走 CDN

cdn:
  enable: false
@Muska-Ami
Copy link

Muska-Ami commented Sep 29, 2023

看了一下源码,好像是直接引入的,CDN这个配置仅限于主题的文件(srcdn 是我自己加的)

hexo.extend.helper.register("renderJS", function (path) {
  const _js = hexo.extend.helper.get("js").bind(hexo);
  const cdnProviders = {
    unpkg: "https://unpkg.com",
    jsdelivr: "https://cdn.jsdelivr.net/npm",
    srcdn: "https://jsd.onmicrosoft.cn/npm",
    aliyun: "https://evan.beee.top/projects",
    custom: this.theme.cdn.custom_url,
  };
// ...等共3段相关内容

评论系统引入相关

<script type="module"  <%= theme.global.single_page === true ? 'data-swup-reload-script' : '' %>>
        import { init } from 'https://evan.beee.top/js/waline.mjs';

        function loadWaline() {
// ...

@EvanNotFound EvanNotFound added bug Something isn't working priority:high It will be completed right away labels Sep 30, 2023
EvanNotFound added a commit that referenced this issue Sep 30, 2023
@EvanNotFound EvanNotFound added the dev:finished Development in dev branch completed. Please wait for the new version to release label Sep 30, 2023
@EvanNotFound
Copy link
Owner

新版本已经更新/修复此功能,请前往更新 https://github.com/EvanNotFound/hexo-theme-redefine/releases

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working dev:finished Development in dev branch completed. Please wait for the new version to release priority:high It will be completed right away
Projects
None yet
Development

No branches or pull requests

3 participants