Skip to content

Commit

Permalink
use cdn
Browse files Browse the repository at this point in the history
  • Loading branch information
xaoxuu committed Dec 23, 2018
1 parent 41164b4 commit 52558d0
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 10 deletions.
2 changes: 2 additions & 0 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -153,3 +153,5 @@ search:
# Less
less:
compress: true

themecdn: //cdn.jsdelivr.net/gh/xaoxuu/[email protected]/
2 changes: 1 addition & 1 deletion layout/_partial/comments.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
</div>
</section>
<script src="//cdn1.lncld.net/static/js/3.0.4/av-min.js"></script>
<script src="//cdn.jsdelivr.net/gh/xaoxuu/[email protected]/js/valine/1.3.4/valine.min.js"></script>
<script src="<%= theme.themecdn %>js/valine/1.3.4/valine.min.js"></script>
<% } %>
<% } %>
<% } %>
Expand Down
4 changes: 2 additions & 2 deletions layout/_partial/head.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@

<!-- style.css -->
<% if (config.import && config.import.style == true) { %>
<%- css('//cdn.jsdelivr.net/gh/xaoxuu/blog@gh-pages/style.css') %>
<%- css(theme.themecdn + 'css/hexo-theme-material-x/style.min.css') %>
<% } else if (config.import && config.import.style && config.import.style.length > 0){ %>
<%- css(config.import.style) %>
<% } else { %>
Expand All @@ -46,7 +46,7 @@

<!-- fontawesome -->
<% if (config.import && config.import.fontawesome == true) { %>
<%- css('//cdn.jsdelivr.net/gh/xaoxuu/cdn@master/fontawesome/5.6.3/css/all.min.css') %>
<%- css(theme.themecdn + 'fontawesome/5.6.3/css/all.min.css') %>
<% } else if (config.import && config.import.fontawesome && config.import.fontawesome.length > 0){ %>
<%- css(config.import.fontawesome) %>
<% } else { %>
Expand Down
8 changes: 4 additions & 4 deletions layout/_partial/scripts.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<script src='https://cdn.jsdelivr.net/npm/[email protected]/dist/waves.min.js'></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/scrollreveal.min.js"></script>
<!-- 访问统计 -->
<script async src="https://cdn.jsdelivr.net/gh/xaoxuu/cdn@master/js/busuanzi/2.3/busuanzi.pure.mini.js"></script>
<script async src="<%= theme.themecdn %>js/busuanzi/2.3/busuanzi.pure.mini.js"></script>
<!-- fastclick -->
<script src="https://cdn.jsdelivr.net/npm/[email protected]/lib/fastclick.min.js"></script>
<script>
Expand Down Expand Up @@ -30,8 +30,8 @@


<% if (config.import && config.import.js == true) { %>
<%- js('//cdn.jsdelivr.net/gh/xaoxuu/hexo-theme-material-x@master/source/js/app.js') %>
<%- js('//cdn.jsdelivr.net/gh/xaoxuu/hexo-theme-material-x@master/source/js/search.js') %>
<%- js(theme.themecdn + 'js/hexo-theme-material-x/app.js') %>
<%- js(theme.themecdn + 'js/hexo-theme-material-x/search.js') %>
<% } else if (config.import && config.import.js && config.import.js.length > 0) { %>
<% (config.usecdn||[]).forEach(function(cdn_url){ %>
<%- js(cdn_url) %>
Expand Down Expand Up @@ -102,7 +102,7 @@

<!-- leancloud_visitors -->
<% if (config.leancloud_visitors && config.leancloud_visitors.app_id && config.leancloud_visitors.app_key) { %>
<script src="https://cdn.jsdelivr.net/gh/xaoxuu/[email protected]/js/leancloud/av-core-mini-0.6.4.js"></script>
<script src="<%= theme.themecdn %>js/leancloud/av-core-mini-0.6.4.js"></script>
<script>AV.initialize("<%= config.leancloud_visitors.app_id %>", "<%= config.leancloud_visitors.app_key %>");</script>
<script>
function showTime(Counter) {
Expand Down
6 changes: 3 additions & 3 deletions source/less/_fonts.less
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
@font-face{
font-family: 'Ubuntu';
src: url(fonts/Ubuntu-Regular.ttf);
src: url(https://cdn.jsdelivr.net/gh/xaoxuu/[email protected]/fonts/Ubuntu-Regular.ttf);
font-weight: normal;
font-style: normal;
}
@font-face{
font-family: 'Monaco';
src: url(fonts/Monaco.ttf);
src: url(https://cdn.jsdelivr.net/gh/xaoxuu/[email protected]/fonts/Monaco.ttf);
font-weight: normal;
font-style: normal;
}
@font-face{
font-family: 'Skranji';
src: url(fonts/Skranji-Regular.ttf);
src: url(https://cdn.jsdelivr.net/gh/xaoxuu/[email protected]/fonts/Skranji-Regular.ttf);
font-weight: normal;
font-style: normal;
}
Expand Down

0 comments on commit 52558d0

Please sign in to comment.