Skip to content

Commit 9cd432a

Browse files
committed
css cdn & add brand config, v1.5.2
1 parent 9d1a6d5 commit 9cd432a

File tree

6 files changed

+7
-6
lines changed

6 files changed

+7
-6
lines changed

_config.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ rss: /atom.xml
3232

3333
# 你的头像url
3434
avatar: /img/avatar.jpg
35+
# 头像背景图
36+
brand: /img/brand.jpg
3537
# favicon
3638
favicon: /favicon.ico
3739

layout/_partial/head.ejs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,6 @@
4848
<link rel="alternative" href="<%- theme.rss %>" title="<%= config.title %>" type="application/atom+xml">
4949
<% } %>
5050
<%- favicon_tag(theme.favicon) %>
51-
<link rel="stylesheet" href="<%= url_for('/css/style.css?v='+ theme_version()) %>">
51+
<link rel="stylesheet" href="<%- url_for(theme_css('/css/style', cache)) %>">
5252
<script>window.lazyScripts=[]</script>
5353
</head>

layout/_partial/menu.ejs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<a href="javascript:;" class="header-icon waves-effect waves-circle waves-light" id="menu-off">
44
<i class="icon icon-lg icon-close"></i>
55
</a>
6-
<div class="brand-wrap">
6+
<div class="brand-wrap" style="background-image:url(<%- url_for(theme.brand) %>)">
77
<div class="brand">
88
<a href="<%- config.root %>" class="avatar waves-effect waves-circle waves-light">
99
<img src="<%- url_for(theme.avatar) %>">

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "hexo-theme-material-indigo",
3-
"version": "1.5.0",
3+
"version": "1.5.2",
44
"description": "Material Design theme for Hexo.",
55
"keywords": [
66
"hexo",

scripts/plugins.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ hexo.extend.helper.register('theme_version', () => version)
44

55
const source = (path, cache, ext) => {
66
if(cache) {
7-
const minFile = `${path}.min${ext}`
8-
return hexo.theme.config.cdn ? `//unpkg.com/${name}@${version}/source${minFile}` : `${minFile}?v=${version}`
7+
const minFile = `${path}${ext === '.js' ? '.min' : ''}${ext}`
8+
return hexo.theme.config.cdn ? `//unpkg.com/${name}@${version}${minFile}` : `${minFile}?v=${version}`
99
} else {
1010
return path + ext
1111
}

source/css/_partial/layout.less

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@
3838
}
3939

4040
.brand-wrap {
41-
background: url(../img/brand.jpg);
4241
background-size: 100% 100%;
4342
}
4443

0 commit comments

Comments
 (0)