hexo-theme-solitude 1.5.9 → 1.5.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (36) hide show
  1. package/.github/workflows/issue_close_question.yml +25 -0
  2. package/.github/workflows/issue_invalid.yml +18 -0
  3. package/.github/workflows/issue_question.yml +30 -0
  4. package/.github/workflows/issue_wontfix.yml +29 -0
  5. package/_config.yml +7 -9
  6. package/layout/includes/head/config.pug +6 -5
  7. package/layout/includes/inject/head.pug +1 -1
  8. package/layout/includes/page/says.pug +2 -2
  9. package/package.json +1 -1
  10. package/plugins.yml +1 -1
  11. package/scripts/event/cdn.js +1 -2
  12. package/scripts/event/init.js +1 -6
  13. package/scripts/event/merge_config.js +203 -0
  14. package/scripts/filter/default.js +11 -12
  15. package/scripts/filter/lazyload.js +0 -2
  16. package/scripts/filter/randomPosts.js +4 -7
  17. package/scripts/helper/stylus.js +16 -0
  18. package/scripts/tags/bvideo.js +2 -2
  19. package/source/css/_global/var.styl +6 -5
  20. package/source/css/_highlight/color.styl +134 -0
  21. package/source/css/_highlight/highlight/index.styl +45 -0
  22. package/source/css/{_widgets/_post/_highlight → _highlight}/index.styl +25 -52
  23. package/source/css/_highlight/prismjs/diff.styl +80 -0
  24. package/source/css/_highlight/prismjs/index.styl +15 -0
  25. package/source/css/_highlight/prismjs/line-number.styl +27 -0
  26. package/source/css/{_widgets/_post/_highlight → _highlight}/theme/default.styl +4 -2
  27. package/source/css/{_widgets/_post/_highlight → _highlight}/theme/mac.styl +2 -1
  28. package/source/css/_page/index.styl +4 -1
  29. package/source/css/_widgets/_post/content.styl +1 -1
  30. package/source/css/_widgets/_post/index.styl +0 -2
  31. package/source/css/index.styl +4 -1
  32. package/source/img/happy-sticker.png +0 -0
  33. package/source/js/main.js +90 -59
  34. package/source/js/utils.js +5 -6
  35. package/source/css/_widgets/_post/_highlight/theme.styl +0 -68
  36. /package/source/css/{_widgets/_post/_highlight → _highlight/highlight}/diff.styl +0 -0
@@ -0,0 +1,25 @@
1
+ name: Close need info
2
+
3
+ on:
4
+ schedule:
5
+ - cron: "0 0 */1 * *"
6
+ workflow_dispatch:
7
+
8
+ jobs:
9
+ close-need-info:
10
+ runs-on: ubuntu-latest
11
+ steps:
12
+ - name: close-issues
13
+ uses: actions-cool/issues-helper@v3
14
+ with:
15
+ actions: "close-issues"
16
+ token: ${{ secrets.GITHUB_TOKEN }}
17
+ labels: "question"
18
+ inactive-day: 60
19
+ close-reason: "not_planned"
20
+ body: |
21
+ Hi there! This issue has been automatically closed because it has not had any activity for 60 days. We label issues as "questions" in hopes of community or maintainer input, and it seems this issue has gone stale.
22
+
23
+ If you still need assistance or believe this closure is a mistake, please feel free to reopen the issue or create a new one with updated details. We're here to help!
24
+
25
+ Thank you for your contributions to our project!
@@ -0,0 +1,18 @@
1
+ name: Issue Invalid
2
+
3
+ on:
4
+ issues:
5
+ types: [labeled]
6
+
7
+ jobs:
8
+ lock-issue:
9
+ runs-on: ubuntu-latest
10
+ if: github.event.label.name == 'invalid'
11
+ steps:
12
+ - name: Lock issue
13
+ uses: actions-cool/issues-helper@v2
14
+ with:
15
+ actions: "lock-issue"
16
+ token: ${{ secrets.GITHUB_TOKEN }}
17
+ issue-number: ${{ github.event.issue.number }}
18
+ lock-reason: "off-topic"
@@ -0,0 +1,30 @@
1
+ name: Issue Question
2
+
3
+ on:
4
+ issues:
5
+ types: [labeled]
6
+
7
+ jobs:
8
+ create-comment:
9
+ runs-on: ubuntu-latest
10
+ if: github.event.label.name == 'question'
11
+ steps:
12
+ - name: Create comment
13
+ uses: actions-cool/issues-helper@v2.0.0
14
+ with:
15
+ actions: "create-comment"
16
+ token: ${{ secrets.ISSUSE_TOKEN }}
17
+ issue-number: ${{ github.event.issue.number }}
18
+ body: |
19
+ Hello! 👋
20
+
21
+ Thank you for submitting your question. To ensure we can provide the best answer possible, could you please confirm you've provided the following details:
22
+ - A clear and concise description of your question.
23
+ - Any relevant code snippets or links to your project.
24
+ - What you've tried so far in attempting to solve your issue.
25
+
26
+ In the meantime, you might find the answer to your question in our [FAQs](https://solitude-docs.efu.me/faq) or [documentation](https://solitude-docs.efu.me/).
27
+
28
+ We aim to respond to questions within 48 hours. If your question is urgent, please consider reaching out through our support channels.
29
+
30
+ Thanks again for reaching out, and we look forward to assisting you!
@@ -0,0 +1,29 @@
1
+ name: Issue Wontfix
2
+
3
+ on:
4
+ issues:
5
+ types: [labeled]
6
+
7
+ jobs:
8
+ handle-wontfix:
9
+ runs-on: ubuntu-latest
10
+ if: github.event.label.name == 'wontfix'
11
+ steps:
12
+ - name: Create comment for wontfix
13
+ uses: actions-cool/issues-helper@v3
14
+ with:
15
+ actions: "create-comment"
16
+ token: ${{ secrets.GITHUB_TOKEN }}
17
+ issue-number: ${{ github.event.issue.number }}
18
+ body: |
19
+ Hi there! This issue has been marked as 'wontfix'. It means we've reviewed the issue but have chosen not to pursue it for reasons that may vary (e.g., aligning with the project's current priorities, outside of project scope, etc.).
20
+
21
+ We understand this might not be the outcome you were hoping for. If you believe this decision should be reconsidered, please provide any additional context or reasoning that was not previously considered.
22
+
23
+ Thank you for your understanding and for contributing to the project. Your efforts are greatly appreciated!
24
+ - name: Close issue after wontfix
25
+ uses: actions-cool/issues-helper@v3
26
+ with:
27
+ actions: "close-issue"
28
+ token: ${{ secrets.GITHUB_TOKEN }}
29
+ issue-number: ${{ github.event.issue.number }}
package/_config.yml CHANGED
@@ -274,7 +274,7 @@ aside:
274
274
  postcount: true
275
275
  # 总字数
276
276
  # The number of words on the web site
277
- wordcount: true
277
+ wordcount: false
278
278
  # 访问量
279
279
  # PV
280
280
  pv: true
@@ -310,7 +310,7 @@ post:
310
310
  # 文章默认图片
311
311
  # default cover
312
312
  cover:
313
- # - /img/default.png # 默认图片 / default cover
313
+ # - # 默认图片 / default cover
314
314
  # 文章发布默认地址
315
315
  # default post locate
316
316
  locate: 衡阳
@@ -585,19 +585,17 @@ loading:
585
585
 
586
586
  #代码高亮增强
587
587
  # code highlight
588
- hightlight:
589
- enable: false
590
- # 代码块行高限制
591
- # Code block line height limit
592
- hightlimit: 200
588
+ highlight:
589
+ enable: true
590
+ limit: 200 # 代码行高限制 / Code line limit
593
591
  copy: true # 是否开启复制按钮 / Whether to enable the copy button
594
- expand: false # 是否默认展开 / Whether to expand by default
592
+ expand: true # 是否默认展开 / Whether to expand by default
595
593
  # 代码块样式
596
594
  # Code block style
597
595
  theme: default # default: 默认 / mac : apple terminal
598
596
  # 代码配色
599
597
  # Code color
600
- color: default # default: 默认 / vscode / solarized-dark / solarized-light / dracula / monokai
598
+ color: default # default: 默认 / dark / funky / okaidia / tomorrow / twilight / darcula / solarized-dark / solarized-light / material / github
601
599
 
602
600
  # 图片灯箱
603
601
  # image lightbox
@@ -44,11 +44,12 @@ script.
44
44
  enable: !{theme.lazyload.enable},
45
45
  error: '!{theme.lazyload.errorimg}'
46
46
  },
47
- hightlight: {
48
- enable: !{theme.hightlight.enable},
49
- limit: !{theme.hightlight.hightlimit},
50
- expand: !{theme.hightlight.expand},
51
- copy: !{theme.hightlight.copy},
47
+ highlight: {
48
+ enable: !{theme.highlight.enable},
49
+ limit: !{theme.highlight.limit},
50
+ expand: !{theme.highlight.expand},
51
+ copy: !{theme.highlight.copy},
52
+ syntax: '!{config.syntax_highlighter}'
52
53
  },
53
54
  randomlinks: !{theme.footer.randomlink},
54
55
  lang: {
@@ -78,7 +78,7 @@ script.
78
78
  )(window)
79
79
 
80
80
  console.log(
81
- "%c Program: Hexo %c Theme: Solitude %c Version: v1.5.9",
81
+ "%c Program: Hexo %c Theme: Solitude %c Version: v1.5.11",
82
82
  "border-radius:5px 0 0 5px;padding: 5px 10px;color:white;background:#ff3842;",
83
83
  "padding: 5px 10px;color:white;background:#3e9f50;",
84
84
  "border-radius:0 5px 5px 0;padding: 5px 10px;background:#0084ff;color:white;"
@@ -31,7 +31,7 @@ if theme.says.enable
31
31
  if item.video.player
32
32
  video(src=item.video.player controls="controls" style="object-fit: cover;")
33
33
  if item.video.bilibili
34
- iframe(src='//player.bilibili.com/player.html?auto-play=0&bvid=' + item.video.bilibili scrolling="no" border="0" frameborder="no" framespacing="0" allowfullscreen="true")
34
+ iframe(src='//player.bilibili.com/player.html?autoplay=0&bvid=' + item.video.bilibili scrolling="no" border="0" frameborder="no" framespacing="0" allowfullscreen="true")
35
35
 
36
36
  if theme.says.style === 1
37
37
  hr
@@ -51,4 +51,4 @@ if theme.says.enable
51
51
  if theme.says.strip === -1
52
52
  | - 已展开所有短文 -
53
53
  else
54
- | - 只展示最近 #{theme.says.strip} 条短文 -
54
+ | - 只展示最近 #{theme.says.strip} 条短文 -
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hexo-theme-solitude",
3
- "version": "1.5.9",
3
+ "version": "1.5.11",
4
4
  "description": "A beautiful, powerful, and efficient Hexo theme developed by the wleelw",
5
5
  "main": "package.json",
6
6
  "scripts": {
package/plugins.yml CHANGED
@@ -51,7 +51,7 @@ aplayer_js:
51
51
  version: 1.10.1
52
52
  meting_js:
53
53
  name: meting
54
- file: Meting.min.js
54
+ file: dist/Meting.min.js
55
55
  version: 2.0.1
56
56
  pace_js:
57
57
  name: pace-js
@@ -120,8 +120,7 @@ hexo.extend.filter.register('before_generate', () => {
120
120
  jsdelivr: `https://cdn.jsdelivr.net/npm/${name}${verType}/${min_file}`,
121
121
  unpkg: `https://unpkg.com/${name}${verType}/${file}`,
122
122
  cdnjs: `https://cdnjs.cloudflare.com/ajax/libs/${cdnjs_name}/${version}/${min_cdnjs_file}`,
123
- custom: (CDN.custom_format || '').replace(/\$\{(.+?)\}/g, (match, $1) => value[$1]),
124
- cdncbd: `https://cdn.cbd.int/${name}${verType}/${file}`,
123
+ custom: (CDN.custom_format || '').replace(/\$\{(.+?)}/g, (match, $1) => value[$1]),
125
124
  }
126
125
 
127
126
  data[key] = cdnSource[type]
@@ -10,13 +10,8 @@ hexo.extend.filter.register('before_generate', () => {
10
10
  process.exit(-1);
11
11
  }
12
12
 
13
- if (config.prismjs.enable) {
14
- logger.error('主题尚未支持 prismjs 请使用 highlightjs !');
15
- process.exit(-1);
16
- }
17
-
18
13
  if (Number(majorVer) < 14) {
19
14
  logger.error('请将 Node.js 升级到 v14.0.0 或更高的版本!');
20
15
  process.exit(-1);
21
16
  }
22
- });
17
+ });
@@ -0,0 +1,203 @@
1
+ hexo.extend.filter.register('before_generate', () => {
2
+ const defaultConfig = {
3
+ site: {
4
+ name: {
5
+ class: 'text', custom: 'Solitude'
6
+ }, siteIcon: '/img/logo.png', icon: 'icon'
7
+ }, nav: {
8
+ group: null, menu: null, right: {
9
+ random: false, console: false, custom: [],
10
+ }
11
+ }, hometop: {
12
+ enable: false, banner: {
13
+ title: 'Solitude', url: 'A simple theme for Hexo', icon: null,
14
+ }, group: null, recommendList: {
15
+ sup: 'Recommend',
16
+ title: 'Solitude Docs',
17
+ url: 'https://solitude-docs.efu.me/',
18
+ img: '/img/default.png',
19
+ color: 'none',
20
+ }
21
+ }, aside: {
22
+ home: {
23
+ noSticky: 'about', Sticky: 'allInfo'
24
+ }, post: {
25
+ noSticky: 'about', Sticky: 'allInfo'
26
+ }, page: {
27
+ noSticky: 'about', Sticky: 'allInfo'
28
+ }, card: {
29
+ author: {
30
+ img: '/img/logo.png', sticker: '/img/happy-sticker.png',
31
+ },
32
+ url: '/about/',
33
+ content1: 'Solitude',
34
+ content2: 'A simple theme for Hexo',
35
+ sayhello: {
36
+ morning: 'Good Morning',
37
+ noon: 'Good Noon',
38
+ afternoon: 'Good Afternoon',
39
+ night: 'Good Night',
40
+ goodnight: 'Good Night',
41
+ },
42
+ sayhello2: ['Welcome to Solitude', 'A simple theme for Hexo', 'Enjoy your time', 'Have a nice day', 'Good luck'],
43
+ information: null,
44
+ }, flip: {
45
+ favicon: '', face: '', backface: '', backcolor: 'var(--efu-blue)'
46
+ }, toc: {
47
+ post: true, page: false, vague: true,
48
+ }, tags: {
49
+ enable: true, limit: 20, highlight: false, list: [],
50
+ }, archive: {
51
+ enable: true, type: 'month'
52
+ }, siteinfo: {
53
+ postcount: true,
54
+ wordcount: false,
55
+ pv: true,
56
+ uv: true,
57
+ updatetime: true,
58
+ runtimeenable: true,
59
+ runtime: "2023-04-20 00:00:00",
60
+ },
61
+ }, page: {
62
+ error: true, tags: true, categories: true, default: {
63
+ cover: ['/img/default.png'],
64
+ }
65
+ }, post: {
66
+ default: {
67
+ cover: ['/img/default.png'], locate: 'China, Changsha', copyright: {
68
+ enable: true,
69
+ license: 'CC BY-NC-SA 4.0',
70
+ licenurl: 'https://creativecommons.org/licenses/by-nc-sa/4.0/',
71
+ }
72
+ }, meta: {
73
+ date: false,
74
+ updated: false,
75
+ locate: false,
76
+ wordcount: false,
77
+ readtime: false,
78
+ pv: false,
79
+ uv: false,
80
+ comment: false,
81
+ }, award: {
82
+ enable: false,
83
+ wechat: 'https://7.isyangs.cn/34/65f2e5814db1a-34.png',
84
+ alipay: 'https://7.isyangs.cn/34/65f2e5a6d2ef5-34.png',
85
+ url: '/about/',
86
+ }, rss: null, covercolor: {
87
+ enable: false, mode: 'local', api: 'https://api.qjqq.cn/api/Imgcolor?img=', time: 43200000,
88
+ }
89
+ }, theme_color: {
90
+ dark: "#ffc848",
91
+ dark_op: "#f2b94b23",
92
+ dark_op_deep: "#f2b94bdd",
93
+ dark_none: "#f2b94b00",
94
+ light: "#425AEF",
95
+ light_op: "#4259ef23",
96
+ light_op_deep: "#4259efdd",
97
+ light_none: "#4259ef01"
98
+ }, display_mode: {
99
+ type: 'auto', universe: false
100
+ }, related_post: {
101
+ enable: false, limit: 2, date_type: 'created'
102
+ }, footer: {
103
+ information: {
104
+ left: null, right: null,
105
+ }, group: null, randomlink: false, privacy: null, license: null, links: [{
106
+ name: 'Solitude', url: 'https://github.com/valor-x/hexo-theme-solitude',
107
+ }]
108
+ }, errorpage: {
109
+ img: 'https://7.isyangs.cn/34/65f2e65eae32a-34.png', text: '404 Not Found', recommendList: true
110
+ }, says: {
111
+ enable: false, home_mini: false, style: 1, strip: 30
112
+ }, meting_api: "https://meting.qjqq.cn/?server=:server&type=:type&id=:id&auth=:auth&r=:r", music: {
113
+ enable: false, id: '8407304077', server: 'netease', type: 'playlist', volume: 0.8, mutex: true,
114
+ }, capsule: {
115
+ enable: false, id: '8407304077', server: 'netease', type: 'playlist',
116
+ }, moments: {
117
+ enable: false,
118
+ api: '',
119
+ error_img: '/img/logo.png',
120
+ sort_rule: 'created',
121
+ expire_days: 1,
122
+ page_init_number: 10,
123
+ page_turning_number: 5,
124
+ angle: false,
125
+ appjs: 'https://cdn.cbd.int/st-source@1.0.3/js/fcircle.min.js',
126
+ bundlejs: 'https://cdn.cbd.int/st-source/js/moment/bundle.min.js',
127
+ randompostjs: 'https://cdn.cbd.int/st-source/js/moment/random_post.min.js'
128
+ }, keyboard: {
129
+ enable: false, list: []
130
+ }, lazyload: {
131
+ enable: false, placeholder: '/img/loading.gif', errorimg: '/img/error_load.png'
132
+ }, loading: {
133
+ fullpage: false, pace: true,
134
+ }, highlight: {
135
+ enable: true, limit: 200, copy: true, expand: true, theme: 'default', color: 'default',
136
+ }, lightbox: false, fancybox: false, mediumZoom: false, mermaid: false, translate: {
137
+ enable: false, defaultEncoding: 2, translateDelay: 0,
138
+ }, opengraph: {
139
+ enable: false, options: null
140
+ }, wordcount: false, busuanzi: false, search: {
141
+ enable: false, type: 'local', tags: [], algolia: null, local: {
142
+ preload: false, CDN: null,
143
+ }
144
+ }, rightside: {
145
+ enable: false
146
+ }, post_ai: {
147
+ enable: false,
148
+ modelName: 'GPT 3',
149
+ key: 'your key',
150
+ talk: 'I am a AI.',
151
+ randomPost: false,
152
+ tips: 'AI is not perfect, please use it with caution.'
153
+ }, katex: {
154
+ enable: false, per_page: false, copytex: false,
155
+ }, comment: {
156
+ enable: false,
157
+ type: 'twikoo',
158
+ commentBarrage: false,
159
+ newComment: false,
160
+ randomInfoStart: [`baby's`, `little`, `my`,],
161
+ randomInfoEnd: [`home`, `world`, `heart`,],
162
+ twikoo: {
163
+ envId: 'your envId', lang: 'zh-CN', accessToken: null,
164
+ },
165
+ waline: {
166
+ envId: 'your envId', pageview: true, option: null,
167
+ },
168
+ verify_site: [],
169
+ css_prefix: false,
170
+ extends: {
171
+ head: [], body: [],
172
+ },
173
+ pwa: {
174
+ enable: false,
175
+ manifest: '/manifest.json',
176
+ theme_color: "#006a73",
177
+ mask_icon: '/img/logo.png',
178
+ apple_touch_icon: '/img/logo.png',
179
+ bookmark_icon: '/img/logo.png',
180
+ favicon_32_32: '/img/logo.png',
181
+ favicon_16_16: '/img/logo.png'
182
+ },
183
+ google_adsense: {
184
+ enable: false,
185
+ auto_ads: false,
186
+ enable_page_level_ads: true,
187
+ js: 'https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js',
188
+ client: '',
189
+ slot: '',
190
+ },
191
+ CDN: {
192
+ internal: 'local',
193
+ third_party: 'cdnjs',
194
+ version: true,
195
+ custom_format: 'https://cdn.staticfile.net/${cdnjs_name}/${version}/${min_cdnjs_file}',
196
+ option: {
197
+ solitude_css: 'https://cdn2.codesign.qq.com/icons/7pOrz0WXB5ZWJPX/latest/iconfont.css',
198
+ }
199
+ }
200
+ }
201
+ }
202
+ hexo.theme.config = Object.assign(defaultConfig, hexo.theme.config)
203
+ }, 1)
@@ -1,24 +1,23 @@
1
1
  'use strict';
2
2
 
3
3
  hexo.extend.filter.register('after_post_render', function (data) {
4
- const config = hexo.theme.config
5
- data.title = data.title || '无标题';
4
+ data.title = data.title || 'Untitled';
5
+ const {config} = hexo.theme;
6
6
  if (data.layout === 'post') {
7
- data.locate = data.locate || config.post.default.locate
8
- data.cc = data.cc || config.post.default.copyright
9
- data.cover = data.cover || config.post.default.cover[getRandomInt(0, config.post.default.cover.length)] || '/img/default.png'
7
+ const {copyright, locate, cover} = hexo.theme.config.post.default
8
+ data.locate = data.locate || locate
9
+ data.cc = data.cc || copyright
10
+ data.cover = data.cover || cover[getRandomInt(0, cover?.length)]
10
11
  data.excerpt = data.description || data.excerpt
11
- if (config.aside.toc.post && data.toc !== false) data.toc = true
12
- else data.toc = false
12
+ data.toc = !!(config.aside.toc.post && data.toc !== false);
13
13
  }
14
14
  if (data.layout === 'page') {
15
- data.cover = data.cover || config.page.default.cover[getRandomInt(0, config.post.default.cover.length)] || '/img/default.png'
15
+ const {cover} = hexo.theme.config.page.default
16
+ data.cover = data.cover || cover[getRandomInt(0, cover?.length)]
16
17
  data.excerpt = data.title
17
- if (config.aside.toc.page && data.toc !== false && data.aside) data.toc = true
18
- else data.toc = false
18
+ data.toc = !!(config.aside.toc.page && data.toc !== false && data.aside);
19
19
  }
20
- if (config.comment.enable && data.comment !== false) data.comment = true
21
- else data.comment = false
20
+ data.comment = !!(config.comment.enable && data.comment !== false);
22
21
  return data;
23
22
  });
24
23
 
@@ -1,5 +1,3 @@
1
- const urlFor = require('hexo-util').url_for.bind(hexo)
2
-
3
1
  hexo.extend.filter.register('after_render:html', function (data) {
4
2
  if (!hexo.theme.config.lazyload.enable) return
5
3
  return data.replace(
@@ -1,8 +1,5 @@
1
1
  hexo.extend.filter.register('after_render:html', function (data) {
2
- const posts = []
3
- hexo.locals.get('posts').map(function (post) {
4
- if (post.random !== false) posts.push(post.path)
5
- })
6
- data += `<script>const posts=${JSON.stringify(posts)};function toRandomPost(){ pjax.loadUrl('/'+posts[Math.floor(Math.random()*posts.length)]); };</script>`
7
- return data
8
- })
2
+ const posts = hexo.locals.get('posts').filter(post => post.random !== false).map(post => post.path);
3
+ data += `<script>const posts=${JSON.stringify(posts)};function toRandomPost(){ pjax.loadUrl('/'+posts[Math.floor(Math.random()*posts.length)]); };</script>`;
4
+ return data;
5
+ });
@@ -23,6 +23,22 @@ hexo.extend.filter.register('stylus:renderer', function (style) {
23
23
  style.define('about', data && data.about ? Object.keys(data.about) : []);
24
24
 
25
25
  initGroupColor(theme.config.hometop.group,style);
26
+
27
+ // highlight
28
+ const { syntax_highlighter: syntaxHighlighter, highlight, prismjs } = hexo.config
29
+ let { enable: highlightEnable, line_number: highlightLineNumber } = highlight
30
+ let { enable: prismjsEnable, line_number: prismjsLineNumber } = prismjs
31
+
32
+ // for hexo > 7.0
33
+ if (syntaxHighlighter) {
34
+ highlightEnable = syntaxHighlighter === 'highlight.js'
35
+ prismjsEnable = syntaxHighlighter === 'prismjs'
36
+ }
37
+
38
+ style.define('$highlight_enable', highlightEnable)
39
+ style.define('$highlight_line_number', highlightLineNumber)
40
+ style.define('$prismjs_enable', prismjsEnable)
41
+ style.define('$prismjs_line_number', prismjsLineNumber)
26
42
  });
27
43
 
28
44
  function initGroupColor(gg,style) {
@@ -1,7 +1,7 @@
1
1
  'use strict'
2
2
 
3
3
  function bilibili(args) {
4
- return `<iframe class="bvideo" width="100%" height="600" src="//player.bilibili.com/player.html?aid=1351697032&bvid=${args}&p=1" border="0" frameBorder="no" framespacing="0" allowFullScreen="true"></iframe>`
4
+ return `<iframe class="bvideo" width="100%" height="600" src="//player.bilibili.com/player.html?autoplay=0&bvid=${args}" border="0" frameBorder="no" framespacing="0" allowFullScreen="true"></iframe>`
5
5
  }
6
6
 
7
- hexo.extend.tag.register('bvideo', bilibili, {ends: false})
7
+ hexo.extend.tag.register('bvideo', bilibili, {ends: false})
@@ -11,15 +11,16 @@ $light_theme_none = hexo-config('theme_color.light_none')
11
11
 
12
12
  $todayCardColor = convert(hexo-config('hometop.recommendList.color'))
13
13
 
14
- // highlight code
15
- if hexo-config('hightlight.theme') == 'default'
14
+ // code
15
+ if hexo-config('highlight.theme') == 'default'
16
16
  $hl_bg_light = #fff
17
17
  $hltools_bg_light = #f7f7f9
18
18
  $hl_bg_dark = #1b1c20
19
19
  $hltools_bg_dark = #21232a
20
-
21
- else if hexo-config('hightlight.theme') == 'mac'
20
+ else if hexo-config('highlight.theme') == 'mac'
22
21
  $hl_bg_light = #FFFFFF
23
22
  $hltools_bg_light = #E7E7E7
24
23
  $hl_bg_dark = #1C1E1E
25
- $hltools_bg_dark = #2A282A
24
+ $hltools_bg_dark = #454a50
25
+
26
+ $line-height-code-block = 1.6