diff --git a/_config.yml b/_config.yml
index 8acf635..9b7575d 100755
--- a/_config.yml
+++ b/_config.yml
@@ -2,12 +2,12 @@
info:
name: Material X
docs: https://xaoxuu.com/wiki/material-x/
- cdn: # 把对应的那一行注释掉就使用本地的文件
+ cdn: # 要使用CDN,请在根目录的config文件中写上 use_cdn: true
css:
style: https://cdn.jsdelivr.net/gh/xaoxuu/cdn-material-x@19.11.26/css/style.css
js:
- app: https://cdn.jsdelivr.net/gh/xaoxuu/cdn-material-x@19.9/js/app.js
- search: https://cdn.jsdelivr.net/gh/xaoxuu/cdn-material-x@19.9/js/search.js
+ app: https://cdn.jsdelivr.net/gh/xaoxuu/cdn-material-x@19.11/js/app.js
+ search: https://cdn.jsdelivr.net/gh/xaoxuu/cdn-material-x@19.11/js/search.js
volantis: https://cdn.jsdelivr.net/gh/xaoxuu/volantis@1.0.6/js/volantis.min.js
diff --git a/layout/_partial/head.ejs b/layout/_partial/head.ejs
index 0e527fa..1745948 100755
--- a/layout/_partial/head.ejs
+++ b/layout/_partial/head.ejs
@@ -59,7 +59,7 @@
<% } %>
- <% if (theme.info && theme.info.cdn && theme.info.cdn.css && theme.info.cdn.css.style) { %>
+ <% if (config.use_cdn && theme.info && theme.info.cdn && theme.info.cdn.css && theme.info.cdn.css.style) { %>
<%- css(theme.info.cdn.css.style) %>
<% } else { %>
<%- css('style.css') %>
diff --git a/layout/_partial/scripts.ejs b/layout/_partial/scripts.ejs
index c970edb..e94de59 100755
--- a/layout/_partial/scripts.ejs
+++ b/layout/_partial/scripts.ejs
@@ -158,7 +158,7 @@
<% if (enableValine){ %>
<% if (theme.valine.volantis == true) { %>
- <% if (theme.info && theme.info.cdn && theme.info.cdn.js && theme.info.cdn.js.volantis) { %>
+ <% if (config.use_cdn && theme.info && theme.info.cdn && theme.info.cdn.js && theme.info.cdn.js.volantis) { %>
<%- js(theme.info.cdn.js.volantis) %>
<% } else { %>
<%- js(['js/volantis.js']) %>
@@ -193,12 +193,12 @@
<% } %>
-<% if (theme.info && theme.info.cdn && theme.info.cdn.js && theme.info.cdn.js.app) { %>
+<% if (config.use_cdn && theme.info && theme.info.cdn && theme.info.cdn.js && theme.info.cdn.js.app) { %>
<%- js(theme.info.cdn.js.app) %>
<% } else { %>
<%- js(['js/app.js']) %>
<% } %>
-<% if (theme.info && theme.info.cdn && theme.info.cdn.js && theme.info.cdn.js.search) { %>
+<% if (config.use_cdn && theme.info && theme.info.cdn && theme.info.cdn.js && theme.info.cdn.js.search) { %>
<%- js(theme.info.cdn.js.search) %>
<% } else { %>
<%- js(['js/search.js']) %>