hexo-theme-solitude 1.10.0 → 1.10.2

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 (46) hide show
  1. package/.github/screenshot.webp +0 -0
  2. package/LICENSE +1 -1
  3. package/README.md +8 -6
  4. package/README_en-US.md +8 -6
  5. package/README_zh-Hant.md +7 -5
  6. package/_config.yml +10 -7
  7. package/languages/default.yml +1 -0
  8. package/languages/en.yml +1 -0
  9. package/languages/zh-CN.yml +1 -0
  10. package/languages/zh-TW.yml +1 -0
  11. package/layout/includes/body/gadsense.pug +2 -2
  12. package/layout/includes/inject/head.pug +1 -1
  13. package/layout/includes/widgets/aside/asideAdsense.pug +5 -0
  14. package/layout/includes/widgets/aside/asideCustom.pug +4 -3
  15. package/layout/includes/widgets/aside/asideSwitch.pug +2 -0
  16. package/layout/includes/widgets/home/categoryBar.pug +6 -2
  17. package/layout/includes/widgets/home/postList.pug +2 -2
  18. package/layout/includes/widgets/page/about/award.pug +2 -1
  19. package/layout/post.pug +5 -0
  20. package/package.json +3 -3
  21. package/scripts/event/merge_config.js +355 -321
  22. package/scripts/tags/button.js +1 -1
  23. package/scripts/tags/link.js +6 -5
  24. package/source/css/_comments/comment.styl +3 -0
  25. package/source/css/_comments/twikoo.styl +16 -37
  26. package/source/css/_comments/valine.styl +3 -0
  27. package/source/css/_global/index.styl +13 -6
  28. package/source/css/_layout/aside.styl +8 -1
  29. package/source/css/_layout/other.styl +0 -3
  30. package/source/css/_mode/index.styl +2 -0
  31. package/source/css/_page/_about/reward.styl +2 -6
  32. package/source/css/_page/_home/category-bar.styl +26 -21
  33. package/source/css/_page/_home/home-top.styl +3 -0
  34. package/source/css/_post/ads.styl +4 -0
  35. package/source/css/_post/index.styl +4 -1
  36. package/source/css/_post/tools.styl +11 -0
  37. package/source/img/error_load.webp +0 -0
  38. package/source/img/loading.gif +0 -0
  39. package/source/js/main.js +6 -4
  40. package/.github/screenshot.png +0 -0
  41. package/README_fr.md +0 -90
  42. package/README_ja.md +0 -88
  43. package/source/img/error_load.png +0 -0
  44. package/source/img/pwa/favicon_128.ico +0 -0
  45. package/source/img/pwa/favicon_256.ico +0 -0
  46. package/source/img/pwa/favicon_512.ico +0 -0
@@ -1,346 +1,380 @@
1
1
  hexo.extend.filter.register('before_generate', () => {
2
- const defaultConfig = {
3
- site: {
4
- name: {
5
- class: 'text', custom: 'Solitude'
6
- }, siteIcon: '/img/pwa/favicon.ico', icon: 'icon'
7
- },
8
- nav: {
9
- group: null, menu: null, right: {
10
- random: false, console: false, custom: [],
11
- }
12
- },
13
- hometop: {
14
- enable: false,
15
- banner: {
16
- title: 'Solitude',
17
- url: 'A simple theme for Hexo',
18
- icon: null,
19
- },
20
- group: null,
21
- recommendList: {
22
- sup: 'Recommend',
23
- title: 'Solitude Docs',
24
- url: 'https://solitude-docs.efu.me/',
25
- img: '/img/default.png',
26
- color: 'none',
27
- }
28
- },
29
- aside: {
30
- home: {
31
- noSticky: 'about', Sticky: 'allInfo'
32
- },
33
- post: {
34
- noSticky: 'about', Sticky: 'allInfo'
35
- },
36
- page: {
37
- noSticky: 'about', Sticky: 'allInfo'
38
- },
39
- card: {
40
- style: 0,
41
- author: {
42
- img: '/img/logo.png', sticker: '/img/happy-sticker.png',
43
- },
44
- url: '/about/',
45
- content1: 'Solitude',
46
- content2: 'A simple theme for Hexo',
47
- sayhello: {
48
- morning: 'Good Morning',
49
- noon: 'Good Noon',
50
- afternoon: 'Good Afternoon',
51
- night: 'Good Night',
52
- goodnight: 'Good Night',
53
- },
54
- sayhello2: ['Welcome to Solitude', 'A simple theme for Hexo', 'Enjoy your time', 'Have a nice day', 'Good luck'],
55
- information: null,
56
- },
57
- flip: {
58
- favicon: '',
59
- face: '',
60
- backface: '',
61
- backcolor: 'var(--efu-blue)'
62
- },
63
- toc: {
64
- post: true,
65
- page: false,
66
- vague: true,
67
- },
68
- tags: {
69
- enable: true,
70
- limit: 20,
71
- highlight: false,
72
- list: [],
73
- }, archive: {
74
- enable: true,
75
- type: 'month'
76
- }, siteinfo: {
77
- postcount: true,
78
- wordcount: false,
79
- pv: true,
80
- uv: true,
81
- updatetime: true,
82
- runtimeenable: true,
83
- runtime: "2023-04-20 00:00:00",
84
- },
2
+ const defaultConfig = {
3
+ site: {
4
+ name: {
5
+ class: 'text',
6
+ custom: 'Solitude'
7
+ },
8
+ siteIcon: '/img/pwa/favicon.ico',
9
+ icon: 'icon'
10
+ },
11
+ nav: {
12
+ group: null,
13
+ menu: null,
14
+ right: {
15
+ random: false,
16
+ console: false,
17
+ custom: [],
18
+ }
19
+ },
20
+ hometop: {
21
+ enable: false,
22
+ banner: {
23
+ title: 'Solitude',
24
+ url: 'A simple theme for Hexo',
25
+ icon: null,
26
+ },
27
+ group: null,
28
+ recommendList: {
29
+ sup: 'Recommend',
30
+ title: 'Solitude Docs',
31
+ url: 'https://solitude.js.org/',
32
+ img: '/img/default.png',
33
+ color: 'none',
34
+ }
35
+ },
36
+ aside: {
37
+ home: {
38
+ noSticky: 'about',
39
+ Sticky: 'allInfo'
85
40
  },
86
- index_post_list: {
87
- direction: 'column',
88
- content: false,
89
- length: 500,
90
- cover: 'both'
41
+ post: {
42
+ noSticky: 'about',
43
+ Sticky: 'allInfo'
91
44
  },
92
45
  page: {
93
- error: true,
94
- tags: true,
95
- categories: true,
96
- default: {
97
- cover: ['/img/default.png'],
98
- }
99
- },
100
- post: {
101
- default: {
102
- cover: ['/img/default.png'],
103
- locate: 'China, Changsha',
104
- copyright: {
105
- enable: true,
106
- license: 'CC BY-NC-SA 4.0',
107
- licenurl: 'https://creativecommons.org/licenses/by-nc-sa/4.0/',
108
- }
109
- },
110
- meta: {
111
- date: false,
112
- updated: false,
113
- locate: false,
114
- wordcount: false,
115
- readtime: false,
116
- pv: false,
117
- uv: false,
118
- comment: false,
46
+ noSticky: 'about',
47
+ Sticky: 'allInfo'
48
+ },
49
+ card: {
50
+ style: 0,
51
+ author: {
52
+ img: '/img/logo.png',
53
+ sticker: '/img/happy-sticker.png',
119
54
  },
120
- award: {
121
- enable: false,
122
- appreciators: '/',
123
- title: '感谢您的赞赏。',
124
- desc: '因为有你们的支持,我才体会到写文章的价值。',
125
- list: [],
126
- },
127
- rss: null,
128
- covercolor: {
129
- enable: false,
130
- mode: 'local',
131
- api: 'https://api.qjqq.cn/api/Imgcolor?img=',
132
- time: 43200000,
133
- }
134
- },
135
- theme_color: {
136
- dark: "#ffc848",
137
- dark_op: "#f2b94b23",
138
- dark_op_deep: "#f2b94bdd",
139
- dark_none: "#f2b94b00",
140
- light: "#425AEF",
141
- light_op: "#4259ef23",
142
- light_op_deep: "#4259efdd",
143
- light_none: "#4259ef01"
144
- },
145
- display_mode: {
146
- type: 'auto',
147
- universe: false
148
- },
149
- related_post: {
150
- enable: false,
151
- limit: 2,
152
- date_type: 'created'
153
- },
154
- footer: {
155
- information: {
156
- author: false,
157
- left: null,
158
- right: null,
55
+ url: '/about/',
56
+ content1: 'Solitude',
57
+ content2: 'A simple theme for Hexo',
58
+ sayhello: {
59
+ morning: 'Good Morning',
60
+ noon: 'Good Noon',
61
+ afternoon: 'Good Afternoon',
62
+ night: 'Good Night',
63
+ goodnight: 'Good Night',
159
64
  },
160
- group: null,
161
- randomlink: false,
162
- privacy: null,
163
- license: null,
164
- links: [{
165
- name: 'Solitude',
166
- url: 'https://github.com/valor-x/hexo-theme-solitude',
167
- }]
168
- }, errorpage: {
169
- img: 'https://7.isyangs.cn/34/65f2e65eae32a-34.png',
170
- text: '404 Not Found',
171
- recommendList: true
172
- }, says: {
173
- enable: false,
174
- home_mini: false,
175
- style: 1,
176
- strip: 30
177
- },
178
- meting_api: "https://meting.qjqq.cn/?server=:server&type=:type&id=:id&auth=:auth&r=:r",
179
- music: {
180
- enable: false,
181
- id: '8407304077',
182
- server: 'netease',
183
- type: 'playlist',
184
- volume: 0.8,
185
- mutex: true,
65
+ sayhello2: ['Welcome to Solitude', 'A simple theme for Hexo', 'Enjoy your time', 'Have a nice day', 'Good luck'],
66
+ information: null,
186
67
  },
187
- capsule: {
188
- enable: false,
189
- id: '8407304077',
190
- server: 'netease',
191
- type: 'playlist',
68
+ flip: {
69
+ favicon: '',
70
+ face: '',
71
+ backface: '',
72
+ backcolor: 'var(--efu-blue)'
192
73
  },
193
- keyboard: {
194
- enable: false,
195
- list: []
196
- }
197
- , lazyload: {
198
- enable: false,
199
- field: 'site',
200
- placeholder: '/img/loading.gif',
201
- errorimg: '/img/error_load.png'
74
+ toc: {
75
+ post: true,
76
+ page: false,
77
+ vague: true,
202
78
  },
203
- loading: {
204
- fullpage: false,
205
- pace: true,
206
- },
207
- highlight: {
79
+ tags: {
208
80
  enable: true,
209
- limit: 200,
210
- copy: true,
211
- expand: true,
212
- theme: 'default',
213
- color: 'default',
214
- },
215
- lightbox: false,
216
- fancybox: false,
217
- mediumZoom: false,
218
- mermaid: false,
219
- OpenGraph: {
220
- enable: false,
221
- options: null
81
+ limit: 20,
82
+ highlight: false,
83
+ list: [],
222
84
  },
223
- wordcount: false,
224
- busuanzi: false,
225
- search: {
226
- enable: false,
227
- type: 'local',
228
- tags: [],
229
- algolia: null,
230
- local: {
231
- preload: false, CDN: null,
232
- }
233
- },
234
- rightside: {
235
- enable: false
236
- },
237
- copy: {
85
+ archive: {
238
86
  enable: true,
87
+ type: 'month'
88
+ },
89
+ siteinfo: {
90
+ postcount: true,
91
+ wordcount: false,
92
+ pv: true,
93
+ uv: true,
94
+ updatetime: true,
95
+ runtimeenable: true,
96
+ runtime: "2023-04-20 00:00:00",
97
+ },
98
+ },
99
+ index_post_list: {
100
+ direction: 'column',
101
+ content: false,
102
+ length: 500,
103
+ cover: 'both'
104
+ },
105
+ page: {
106
+ error: true,
107
+ tags: true,
108
+ categories: true,
109
+ default: {
110
+ cover: ['/img/default.png'],
111
+ }
112
+ },
113
+ post: {
114
+ default: {
115
+ cover: ['/img/default.png'],
116
+ locate: 'China, Changsha',
239
117
  copyright: {
240
- enable: false,
241
- limit: 50
118
+ enable: true,
119
+ license: 'CC BY-NC-SA 4.0',
120
+ licenurl: 'https://creativecommons.org/licenses/by-nc-sa/4.0/',
242
121
  }
243
122
  },
244
- post_ai: {
123
+ meta: {
124
+ date: false,
125
+ updated: false,
126
+ locate: false,
127
+ wordcount: false,
128
+ readtime: false,
129
+ pv: false,
130
+ uv: false,
131
+ comment: false,
132
+ },
133
+ award: {
245
134
  enable: false,
246
- modelName: 'GPT 3',
247
- key: 'your key',
248
- talk: 'I am a AI.',
249
- randomPost: false,
250
- tips: 'AI is not perfect, please use it with caution.'
135
+ appreciators: '/',
136
+ title: '感谢您的赞赏。',
137
+ desc: '因为有你们的支持,我才体会到写文章的价值。',
138
+ list: [],
251
139
  },
252
- katex: {
140
+ rss: null,
141
+ covercolor: {
253
142
  enable: false,
254
- per_page: false,
255
- copytex: false,
143
+ mode: 'local',
144
+ api: 'https://api.qjqq.cn/api/Imgcolor?img=',
145
+ time: 43200000,
256
146
  },
257
- comment: {
258
- use: null,
259
- commentBarrage: false,
260
- lazyload: false,
261
- count: false,
262
- avatar: 'https://cravatar.cn',
263
- newest_comment: {
264
- enable: false,
265
- storage: .2
147
+ footer: {
148
+ enable: true,
149
+ desc: "来自 Efu 的文章",
150
+ button: {
151
+ enable: true,
152
+ name: '返回首页',
153
+ url: '/'
266
154
  }
267
- },
268
- twikoo: {
269
- envId: 'your envId',
270
- region: null,
271
- style: true,
272
- accessToken: null,
273
- option: null,
274
- },
275
- waline: {
276
- envId: 'your envId',
277
- pageview: true,
278
- option: null,
279
- },
280
- valine: {
281
- appId: 'your appId',
282
- appKey: 'your appKey',
283
- serverURLs: 'your serverURLs',
284
- avatar: 'monsterid',
285
- visitor: false,
286
- style: true,
287
- option: null,
288
- },
289
- artalk: {
290
- server: 'your server',
291
- site: 'your site-name',
292
- option: null,
293
- },
294
- verify_site: [],
295
- css_prefix: false,
296
- font: {
297
- 'font-size': '16px',
298
- 'code-font-size': '16px',
299
- 'font-family': 'PingFang SC, Hiragino Sans GB,Microsoft YaHei',
300
- 'code-font-family': 'monospace, monospace',
301
- },
302
- extends: {
303
- head: [],
304
- body: [],
305
- },
306
- pwa: {
155
+ }
156
+ },
157
+ theme_color: {
158
+ dark: "#ffc848",
159
+ dark_op: "#f2b94b23",
160
+ dark_op_deep: "#f2b94bdd",
161
+ dark_none: "#f2b94b00",
162
+ light: "#425AEF",
163
+ light_op: "#4259ef23",
164
+ light_op_deep: "#4259efdd",
165
+ light_none: "#4259ef01"
166
+ },
167
+ display_mode: {
168
+ type: 'auto',
169
+ universe: false
170
+ },
171
+ related_post: {
172
+ enable: false,
173
+ limit: 2,
174
+ date_type: 'created'
175
+ },
176
+ footer: {
177
+ information: {
178
+ author: false,
179
+ left: null,
180
+ right: null,
181
+ },
182
+ group: null,
183
+ randomlink: false,
184
+ privacy: null,
185
+ license: null,
186
+ links: [{
187
+ name: 'Solitude',
188
+ url: 'https://github.com/valor-x/hexo-theme-solitude',
189
+ }]
190
+ },
191
+ errorpage: {
192
+ img: 'https://7.isyangs.cn/34/65f2e65eae32a-34.png',
193
+ text: '404 Not Found',
194
+ recommendList: true
195
+ },
196
+ says: {
197
+ enable: false,
198
+ home_mini: false,
199
+ style: 1,
200
+ strip: 30
201
+ },
202
+ envelope: {
203
+ enable: false,
204
+ line: 10,
205
+ speed: 20,
206
+ hover: true,
207
+ loop: true,
208
+ },
209
+ meting_api: "https://meting.qjqq.cn/?server=:server&type=:type&id=:id&auth=:auth&r=:r",
210
+ music: {
211
+ enable: false,
212
+ id: '8407304077',
213
+ server: 'netease',
214
+ type: 'playlist',
215
+ volume: 0.8,
216
+ mutex: true,
217
+ },
218
+ capsule: {
219
+ enable: false,
220
+ id: '8407304077',
221
+ server: 'netease',
222
+ type: 'playlist',
223
+ },
224
+ keyboard: {
225
+ enable: false,
226
+ list: []
227
+ },
228
+ lazyload: {
229
+ enable: false,
230
+ field: 'site',
231
+ placeholder: '/img/loading.gif',
232
+ errorimg: '/img/error_load.webp'
233
+ },
234
+ loading: {
235
+ fullpage: false,
236
+ pace: true,
237
+ },
238
+ highlight: {
239
+ enable: true,
240
+ limit: 200,
241
+ copy: true,
242
+ expand: true,
243
+ theme: 'default',
244
+ color: 'default',
245
+ },
246
+ lightbox: false,
247
+ fancybox: false,
248
+ mediumZoom: false,
249
+ mermaid: false,
250
+ OpenGraph: {
251
+ enable: false,
252
+ options: null
253
+ },
254
+ wordcount: false,
255
+ busuanzi: false,
256
+ search: {
257
+ enable: false,
258
+ type: 'local',
259
+ tags: [],
260
+ algolia: null,
261
+ local: {
262
+ preload: false,
263
+ CDN: null,
264
+ }
265
+ },
266
+ rightside: {
267
+ enable: false
268
+ },
269
+ copy: {
270
+ enable: true,
271
+ copyright: {
307
272
  enable: false,
308
- manifest: '/manifest.json',
309
- theme_color: "#006a73",
310
- mask_icon: '/img/logo.png',
311
- apple_touch_icon: '/img/logo.png',
312
- bookmark_icon: '/img/logo.png',
313
- favicon_32_32: '/img/logo.png',
314
- favicon_16_16: '/img/logo.png'
315
- },
316
- google_adsense: {
273
+ limit: 50
274
+ }
275
+ },
276
+ post_ai: {
277
+ enable: false,
278
+ modelName: 'GPT 3',
279
+ key: 'your key',
280
+ talk: 'I am a AI.',
281
+ randomPost: false,
282
+ tips: 'AI is not perfect, please use it with caution.'
283
+ },
284
+ katex: {
285
+ enable: false,
286
+ per_page: false,
287
+ copytex: false,
288
+ },
289
+ comment: {
290
+ use: null,
291
+ commentBarrage: false,
292
+ lazyload: false,
293
+ count: false,
294
+ avatar: 'https://cravatar.cn',
295
+ newest_comment: {
317
296
  enable: false,
318
- auto_ads: false,
319
- enable_page_level_ads: true,
320
- js: 'https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js',
321
- client: '',
322
- slot: '',
323
- },
324
- right_menu: {
297
+ storage: .2
298
+ }
299
+ },
300
+ twikoo: {
301
+ envId: 'your envId',
302
+ region: null,
303
+ style: true,
304
+ accessToken: null,
305
+ option: null,
306
+ },
307
+ waline: {
308
+ envId: 'your envId',
309
+ pageview: true,
310
+ option: null,
311
+ },
312
+ valine: {
313
+ appId: 'your appId',
314
+ appKey: 'your appKey',
315
+ serverURLs: 'your serverURLs',
316
+ avatar: 'monsterid',
317
+ visitor: false,
318
+ style: true,
319
+ option: null,
320
+ },
321
+ artalk: {
322
+ server: 'your server',
323
+ site: 'your site-name',
324
+ option: null,
325
+ },
326
+ verify_site: [],
327
+ css_prefix: false,
328
+ font: {
329
+ 'font-size': '16px',
330
+ 'code-font-size': '16px',
331
+ 'font-family': 'PingFang SC, Hiragino Sans GB,Microsoft YaHei',
332
+ 'code-font-family': 'monospace, monospace',
333
+ },
334
+ extends: {
335
+ head: [],
336
+ body: [],
337
+ },
338
+ pwa: {
339
+ enable: false,
340
+ manifest: '/manifest.json',
341
+ theme_color: "#006a73",
342
+ mask_icon: '/img/logo.png',
343
+ apple_touch_icon: '/img/logo.png',
344
+ bookmark_icon: '/img/logo.png',
345
+ favicon_32_32: '/img/logo.png',
346
+ favicon_16_16: '/img/logo.png'
347
+ },
348
+ google_adsense: {
349
+ enable: false,
350
+ auto_ads: false,
351
+ aside_card: false,
352
+ post_card: false,
353
+ post_content: false,
354
+ enable_page_level_ads: false,
355
+ js: 'https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js',
356
+ client: '',
357
+ slot: '',
358
+ },
359
+ right_menu: {
360
+ enable: false,
361
+ commentBarrage: false,
362
+ translate: {
325
363
  enable: false,
326
- commentBarrage: false,
327
- translate: {
328
- enable: false,
329
- defaultEncoding: 2,
330
- translateDelay: 0,
331
- },
332
- custom_list: []
333
- },
334
- CDN: {
335
- internal: 'local',
336
- third_party: 'cdnjs',
337
- version: true,
338
- custom_format: 'https://cdn.staticfile.net/${cdnjs_name}/${version}/${min_cdnjs_file}',
339
- option: {
340
- solitude_css: 'https://cdn2.codesign.qq.com/icons/7pOrz0WXB5ZWJPX/latest/iconfont.css',
341
- }
364
+ defaultEncoding: 2,
365
+ translateDelay: 0,
366
+ },
367
+ custom_list: []
368
+ },
369
+ CDN: {
370
+ internal: 'local',
371
+ third_party: 'cdnjs',
372
+ version: true,
373
+ custom_format: 'https://cdn.staticfile.net/${cdnjs_name}/${version}/${min_cdnjs_file}',
374
+ option: {
375
+ solitude_css: 'https://cdn2.codesign.qq.com/icons/7pOrz0WXB5ZWJPX/latest/iconfont.css',
342
376
  }
343
377
  }
344
- hexo.theme.config = Object.assign(defaultConfig, hexo.theme.config)
345
- }, 1
346
- )
378
+ }
379
+ hexo.theme.config = Object.assign(defaultConfig, hexo.theme.config)
380
+ }, 1)