Skip to content

Commit 0fb102a

Browse files
authored
Merge pull request #44 from f-dong/BUG修复
Bug修复
2 parents 7b23047 + e69030c commit 0fb102a

File tree

3 files changed

+18
-5
lines changed

3 files changed

+18
-5
lines changed

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-minimalism",
3-
"version": "1.3.11",
3+
"version": "1.4.0",
44
"private": false,
55
"description": "a minimalist Hexo theme that is simple yet elegant, enabling your blog content to shine. Its powerful features also help you create a personalized blog that truly stands out.",
66
"scripts": {

scripts/events/config.js

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,21 @@ function merge(target, source) {
2020
hexo.on('generateBefore', () => {
2121
merge(hexo.theme.config, hexo.config.theme_config);
2222

23-
hexo.theme.config.highlight = hexo.config.highlight.enable ? {enable: true} : {enable: false};
24-
hexo.theme.config.prismjs = hexo.config.prismjs.enable ? {enable: true} : {enable: false};
23+
// hexo v7.0.0 新的配置改动
24+
if (hexo.config.syntax_highlighter) {
25+
if (hexo.config.syntax_highlighter === 'prismjs') {
26+
hexo.theme.config.prismjs = {enable: true};
27+
hexo.theme.config.highlight = {enable: false};
28+
} else if (hexo.config.syntax_highlighter === 'highlight.js') {
29+
hexo.theme.config.prismjs = {enable: false};
30+
hexo.theme.config.highlight = {enable: true};
31+
} else {
32+
hexo.log.warn('Unsupported syntax highlighter: ' + hexo.config.syntax_highlighter);
33+
}
34+
} else { // v7.0.0 以下版本
35+
hexo.theme.config.highlight = hexo.config.highlight.enable ? {enable: true} : {enable: false};
36+
hexo.theme.config.prismjs = hexo.config.prismjs.enable ? {enable: true} : {enable: false};
37+
}
2538

2639
// 评论系统,旧配置兼容
2740
if (typeof hexo.theme.config.comment !== 'object' && hexo.theme.config.gitalk) {

source/style/_blocks/post.styl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@
178178
display: flex;
179179
}
180180

181-
@media (max-width: 1200px) {
181+
@media (max-width: 1400px) {
182182
.top-box {
183183
display: none;
184184
}
@@ -200,7 +200,7 @@
200200
}
201201
}
202202

203-
@media (min-width: 1200px) {
203+
@media (min-width: 1400px) {
204204
.top-div {
205205
box-sizing: border-box;
206206
margin: 0;

0 commit comments

Comments
 (0)