hexo-theme-solitude 3.0.10 → 3.0.12

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 (39) hide show
  1. package/_config.yml +45 -57
  2. package/languages/default.yml +14 -15
  3. package/languages/en.yml +22 -24
  4. package/languages/zh-CN.yml +14 -15
  5. package/languages/zh-TW.yml +14 -15
  6. package/layout/includes/head/config.pug +0 -11
  7. package/layout/includes/head/page_config.pug +1 -1
  8. package/layout/includes/inject/body.pug +1 -1
  9. package/layout/includes/layout.pug +0 -4
  10. package/layout/includes/page/brevity.pug +2 -2
  11. package/layout/includes/widgets/page/about/award.pug +1 -1
  12. package/layout/includes/widgets/page/about/skillsinfo.pug +12 -11
  13. package/layout/includes/widgets/page/kit/content.pug +3 -2
  14. package/layout/includes/widgets/page/links/banner.pug +7 -6
  15. package/layout/includes/widgets/post/ai.pug +7 -0
  16. package/layout/includes/widgets/sidebar/artalk.pug +1 -1
  17. package/layout/post.pug +2 -2
  18. package/package.json +6 -6
  19. package/plugins.yml +8 -8
  20. package/scripts/event/cdn.js +83 -60
  21. package/scripts/event/merge_config.js +385 -385
  22. package/scripts/filter/default.js +22 -24
  23. package/scripts/tags/tabs.js +29 -18
  24. package/source/css/_global/index.styl +2 -2
  25. package/source/css/_layout/article-container.styl +1 -1
  26. package/source/css/_layout/other.styl +2 -2
  27. package/source/css/_page/_about/reward.styl +13 -12
  28. package/source/css/_post/index.styl +103 -4
  29. package/source/css/_tags/gallery.styl +1 -0
  30. package/source/css/_tags/tabs.styl +36 -96
  31. package/source/css/index.styl +0 -4
  32. package/source/js/main.js +447 -257
  33. package/source/js/post_ai.js +118 -0
  34. package/source/js/utils.js +0 -6
  35. package/layout/includes/widgets/post/post-ai.pug +0 -12
  36. package/layout/includes/widgets/third-party/tianli-talk.pug +0 -26
  37. package/source/css/_post/postAI.styl +0 -132
  38. package/source/css/third_party/tianli_talk.styl +0 -77
  39. package/source/js/third_party/post_ai.min.js +0 -184
@@ -1,403 +1,403 @@
1
- hexo.extend.filter.register('before_generate', () => {
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
- custom: [],
17
- }
18
- },
19
- hometop: {
20
- enable: false,
21
- banner: {
22
- title: 'Solitude',
23
- url: 'A simple theme for Hexo',
24
- icon: null,
25
- },
26
- group: null,
27
- recommendList: {
28
- sup: 'Recommend',
29
- title: 'Solitude Docs',
30
- url: 'https://solitude.js.org/',
31
- img: '/img/default.avif',
32
- color: 'none',
33
- }
34
- },
35
- aside: {
36
- home: { noSticky: 'about', Sticky: 'allInfo' },
37
- post: { noSticky: 'about', Sticky: 'allInfo' },
38
- page: { noSticky: 'about', Sticky: 'allInfo' },
39
- card: {
40
- author: {
41
- img: '/img/logo.png',
42
- sticker: '/img/happy-sticker.avif',
1
+ hexo.extend.filter.register(
2
+ "before_generate",
3
+ () => {
4
+ const defaultConfig = {
5
+ site: {
6
+ name: {
7
+ class: "text",
8
+ custom: "Solitude",
43
9
  },
44
- url: '/about/',
45
- content1: 'Solitude',
46
- state: {
47
- morning: 'Good Morning',
48
- noon: 'Good Noon',
49
- afternoon: 'Good Afternoon',
50
- night: 'Good Night',
51
- goodnight: 'Good Night',
10
+ siteIcon: "/img/pwa/favicon.ico",
11
+ icon: "icon",
12
+ },
13
+ nav: {
14
+ group: null,
15
+ menu: null,
16
+ right: {
17
+ random: false,
18
+ custom: [],
52
19
  },
53
- witty_words: [],
54
- information: null,
55
20
  },
56
- newest_comment: {
21
+ hometop: {
57
22
  enable: false,
58
- storage: 0.5,
59
- limit: 5
60
- },
61
- toc: { post: true, page: false, vague: true },
62
- tags: { enable: true, limit: 20, highlight: false, list: [] },
63
- siteinfo: {
64
- postcount: true,
65
- wordcount: false,
66
- pv: true,
67
- uv: true,
68
- updatetime: true,
69
- runtimeenable: true,
70
- runtime: "2023-04-20 00:00:00",
71
- },
72
- },
73
- index_post_list: {
74
- direction: 'column',
75
- column: 2,
76
- cover: 'both'
77
- },
78
- page: {
79
- error: true,
80
- tags: true,
81
- categories: true,
82
- archives: 0,
83
- default: { cover: ['/img/default.avif'] },
84
- },
85
- post: {
86
- default: {
87
- cover: ['/img/default.avif'],
88
- locate: 'China, Changsha',
89
- copyright: {
23
+ banner: {
24
+ title: "Solitude",
25
+ url: "A simple theme for Hexo",
26
+ icon: null,
27
+ },
28
+ group: null,
29
+ recommendList: {
30
+ sup: "Recommend",
31
+ title: "Solitude Docs",
32
+ url: "https://solitude.js.org/",
33
+ img: "/img/default.avif",
34
+ color: "none",
35
+ },
36
+ },
37
+ aside: {
38
+ home: { noSticky: "about", Sticky: "allInfo" },
39
+ post: { noSticky: "about", Sticky: "allInfo" },
40
+ page: { noSticky: "about", Sticky: "allInfo" },
41
+ card: {
42
+ author: {
43
+ img: "/img/logo.png",
44
+ sticker: "/img/happy-sticker.avif",
45
+ },
46
+ url: "/about/",
47
+ content1: "Solitude",
48
+ state: {
49
+ morning: "Good Morning",
50
+ noon: "Good Noon",
51
+ afternoon: "Good Afternoon",
52
+ night: "Good Night",
53
+ goodnight: "Good Night",
54
+ },
55
+ witty_words: [],
56
+ information: null,
57
+ },
58
+ newest_comment: {
59
+ enable: false,
60
+ storage: 0.5,
61
+ limit: 5,
62
+ },
63
+ toc: { post: true, page: false, vague: true },
64
+ tags: { enable: true, limit: 20, highlight: false, list: [] },
65
+ siteinfo: {
66
+ postcount: true,
67
+ wordcount: false,
68
+ pv: true,
69
+ uv: true,
70
+ updatetime: true,
71
+ runtimeenable: true,
72
+ runtime: "2023-04-20 00:00:00",
73
+ },
74
+ },
75
+ index_post_list: {
76
+ direction: "column",
77
+ column: 2,
78
+ cover: "both",
79
+ },
80
+ page: {
81
+ error: true,
82
+ tags: true,
83
+ categories: true,
84
+ archives: 0,
85
+ default: { cover: ["/img/default.avif"] },
86
+ },
87
+ post: {
88
+ default: {
89
+ cover: ["/img/default.avif"],
90
+ locate: "China, Changsha",
91
+ copyright: {
92
+ enable: true,
93
+ license: "CC BY-NC-SA 4.0",
94
+ licenurl: "https://creativecommons.org/licenses/by-nc-sa/4.0/",
95
+ },
96
+ },
97
+ ai: {
98
+ enable: false,
99
+ modelName: "GPT 3",
100
+ },
101
+ meta: {
102
+ date: false,
103
+ updated: false,
104
+ locate: false,
105
+ wordcount: false,
106
+ readtime: false,
107
+ pv: false,
108
+ uv: false,
109
+ comment: false,
110
+ },
111
+ award: {
112
+ enable: false,
113
+ appreciators: "/",
114
+ title: "感谢您的赞赏。",
115
+ desc: "因为有你们的支持,我才体会到写文章的价值。",
116
+ list: [],
117
+ },
118
+ rss: null,
119
+ covercolor: {
120
+ enable: false,
121
+ mode: "local",
122
+ api: "https://api.qjqq.cn/api/Imgcolor?img=",
123
+ time: 43200000,
124
+ },
125
+ share: { enable: false, list: [] },
126
+ footer: {
90
127
  enable: true,
91
- license: 'CC BY-NC-SA 4.0',
92
- licenurl: 'https://creativecommons.org/licenses/by-nc-sa/4.0/',
93
- }
94
- },
95
- meta: {
96
- date: false,
97
- updated: false,
98
- locate: false,
99
- wordcount: false,
100
- readtime: false,
101
- pv: false,
102
- uv: false,
103
- comment: false,
104
- },
105
- award: {
128
+ desc: "The article from Solitude",
129
+ button: {
130
+ enable: true,
131
+ name: "Learn More",
132
+ url: "/",
133
+ },
134
+ },
135
+ },
136
+ theme_color: {
137
+ dark: "#ffc848",
138
+ light: "#425AEF",
139
+ },
140
+ display_mode: {
141
+ type: "auto",
142
+ universe: false,
143
+ },
144
+ related_post: {
145
+ enable: false,
146
+ limit: 2,
147
+ date_type: "created",
148
+ },
149
+ footer: {
150
+ information: {
151
+ author: false,
152
+ left: null,
153
+ right: null,
154
+ },
155
+ group: null,
156
+ randomlink: false,
157
+ privacy: null,
158
+ license: null,
159
+ links: null,
160
+ },
161
+ errorpage: {
162
+ img: "https://7.isyangs.cn/34/65f2e65eae32a-34.png",
163
+ text: "404 Not Found",
164
+ recommendList: true,
165
+ },
166
+ brevity: {
167
+ enable: false,
168
+ music: false,
169
+ home_mini: false,
170
+ style: 1,
171
+ strip: 30,
172
+ },
173
+ recent_comments: {
174
+ enable: false,
175
+ limit: 50,
176
+ console: false,
177
+ page: "/recentcomments/",
178
+ },
179
+ envelope: {
180
+ enable: false,
181
+ line: 10,
182
+ speed: 20,
183
+ hover: true,
184
+ loop: true,
185
+ page: "/message/",
186
+ },
187
+ meting_api:
188
+ "https://meting.qjqq.cn/?server=:server&type=:type&id=:id&auth=:auth&r=:r",
189
+ music: {
190
+ enable: false,
191
+ id: "8407304077",
192
+ server: "netease",
193
+ type: "playlist",
194
+ volume: 0.8,
195
+ mutex: true,
196
+ },
197
+ capsule: {
198
+ enable: false,
199
+ id: "8407304077",
200
+ server: "netease",
201
+ type: "playlist",
202
+ volume: 0.8,
203
+ },
204
+ keyboard: {
106
205
  enable: false,
107
- appreciators: '/',
108
- title: '感谢您的赞赏。',
109
- desc: '因为有你们的支持,我才体会到写文章的价值。',
110
206
  list: [],
111
207
  },
112
- rss: null,
113
- covercolor: {
208
+ lazyload: {
114
209
  enable: false,
115
- mode: 'local',
116
- api: 'https://api.qjqq.cn/api/Imgcolor?img=',
117
- time: 43200000,
210
+ field: "site",
211
+ placeholder: "/img/loading.avif",
212
+ errorimg: "/img/error_load.avif",
118
213
  },
119
- share: { enable: false, list: [] },
120
- footer: {
214
+ loading: {
215
+ fullpage: false,
216
+ pace: true,
217
+ },
218
+ highlight: {
121
219
  enable: true,
122
- desc: "The article from Solitude",
123
- button: {
124
- enable: true,
125
- name: 'Learn More',
126
- url: '/'
127
- }
128
- }
129
- },
130
- theme_color: {
131
- dark: "#ffc848",
132
- light: "#425AEF"
133
- },
134
- display_mode: {
135
- type: 'auto',
136
- universe: false
137
- },
138
- related_post: {
139
- enable: false,
140
- limit: 2,
141
- date_type: 'created'
142
- },
143
- footer: {
144
- information: {
145
- author: false,
146
- left: null,
147
- right: null,
148
- },
149
- group: null,
150
- randomlink: false,
151
- privacy: null,
152
- license: null,
153
- links: [{
154
- name: 'Solitude',
155
- url: 'https://github.com/everfu/hexo-theme-solitude',
156
- }]
157
- },
158
- errorpage: {
159
- img: 'https://7.isyangs.cn/34/65f2e65eae32a-34.png',
160
- text: '404 Not Found',
161
- recommendList: true
162
- },
163
- brevity: {
164
- enable: false,
165
- music: false,
166
- home_mini: false,
167
- style: 1,
168
- strip: 30
169
- },
170
- recent_comments: {
171
- enable: false,
172
- limit: 50,
173
- console: false,
174
- page: '/recentcomments/'
175
- },
176
- envelope: {
177
- enable: false,
178
- line: 10,
179
- speed: 20,
180
- hover: true,
181
- loop: true,
182
- page: '/message/'
183
- },
184
- meting_api: "https://meting.qjqq.cn/?server=:server&type=:type&id=:id&auth=:auth&r=:r",
185
- music: {
186
- enable: false,
187
- id: '8407304077',
188
- server: 'netease',
189
- type: 'playlist',
190
- volume: 0.8,
191
- mutex: true,
192
- },
193
- capsule: {
194
- enable: false,
195
- id: '8407304077',
196
- server: 'netease',
197
- type: 'playlist',
198
- volume: 0.8,
199
- },
200
- keyboard: {
201
- enable: false,
202
- list: []
203
- },
204
- lazyload: {
205
- enable: false,
206
- field: 'site',
207
- placeholder: '/img/loading.avif',
208
- errorimg: '/img/error_load.avif'
209
- },
210
- loading: {
211
- fullpage: false,
212
- pace: true,
213
- },
214
- highlight: {
215
- enable: true,
216
- limit: 200,
217
- copy: true,
218
- expand: true,
219
- theme: 'default',
220
- color: 'default',
221
- },
222
- lightbox: false,
223
- fancybox: false,
224
- mediumZoom: false,
225
- mermaid: false,
226
- chart: false,
227
- typeit: false,
228
- OpenGraph: {
229
- enable: false,
230
- options: null
231
- },
232
- wordcount: false,
233
- busuanzi: false,
234
- search: {
235
- enable: false,
236
- type: 'local',
237
- tags: [],
238
- algolia: null,
239
- local: {
240
- preload: false,
241
- CDN: null,
242
- },
243
- docsearch: {
244
- appId: null,
245
- apiKey: null,
246
- indexName: null,
247
- option: null
248
- }
249
- },
250
- rightside: {
251
- enable: false
252
- },
253
- copy: {
254
- enable: true,
255
- copyright: {
220
+ limit: 200,
221
+ copy: true,
222
+ expand: true,
223
+ theme: "default",
224
+ color: "default",
225
+ },
226
+ lightbox: false,
227
+ fancybox: false,
228
+ mediumZoom: false,
229
+ mermaid: false,
230
+ chart: false,
231
+ typeit: false,
232
+ OpenGraph: {
256
233
  enable: false,
257
- limit: 50
258
- }
259
- },
260
- post_ai: {
261
- enable: false,
262
- modelName: 'GPT 3',
263
- key: 'your key',
264
- talk: '我是 Ai 机器人',
265
- randomPost: false,
266
- tips: 'AI is not perfect, please use it with caution.'
267
- },
268
- katex: {
269
- enable: false,
270
- per_page: false,
271
- copytex: false,
272
- },
273
- comment: {
274
- use: null,
275
- commentBarrage: false,
276
- lazyload: false,
277
- count: false,
278
- avatar: 'https://gravatar.com/avatar',
279
- hot_tip: {
234
+ options: null,
235
+ },
236
+ wordcount: false,
237
+ busuanzi: false,
238
+ search: {
239
+ enable: false,
240
+ type: "local",
241
+ tags: [],
242
+ algolia: null,
243
+ local: {
244
+ preload: false,
245
+ CDN: null,
246
+ },
247
+ docsearch: {
248
+ appId: null,
249
+ apiKey: null,
250
+ indexName: null,
251
+ option: null,
252
+ },
253
+ },
254
+ rightside: {
255
+ enable: false,
256
+ },
257
+ copy: {
280
258
  enable: true,
281
- count: 3
282
- }
283
- },
284
- twikoo: {
285
- envId: 'your envId',
286
- region: null,
287
- style: true,
288
- accessToken: null,
289
- option: null,
290
- },
291
- waline: {
292
- envId: 'your envId',
293
- pageview: true,
294
- option: null,
295
- },
296
- valine: {
297
- appId: 'your appId',
298
- appKey: 'your appKey',
299
- serverURLs: 'your serverURLs',
300
- avatar: 'monsterid',
301
- visitor: false,
302
- style: true,
303
- option: null,
304
- },
305
- artalk: {
306
- server: 'your server',
307
- site: 'your site-name',
308
- option: null,
309
- },
310
- console: {
311
- enable: false,
312
- recentComment: {
259
+ copyright: {
260
+ enable: false,
261
+ limit: 50,
262
+ },
263
+ },
264
+ katex: {
313
265
  enable: false,
314
- storage: 0.2,
266
+ per_page: false,
267
+ copytex: false,
315
268
  },
316
- card: {
317
- tags: true,
318
- archive: true
319
- }
320
- },
321
- verify_site: [],
322
- css_prefix: false,
323
- font: {
324
- 'font-size': '16px',
325
- 'code-font-size': '16px',
326
- 'font-family': 'PingFang SC, Hiragino Sans GB,Microsoft YaHei, sans-serif',
327
- 'code-font-family': '"monospace", monospace',
328
- },
329
- extends: {
330
- head: [],
331
- body: [],
332
- },
333
- pwa: {
334
- enable: false,
335
- manifest: '/manifest.json',
336
- theme_color: "#006a73",
337
- mask_icon: '/img/pwa/favicon.ico',
338
- apple_touch_icon: '/img/pwa/favicon.ico',
339
- bookmark_icon: '/img/pwa/favicon.ico',
340
- favicon_32_32: '/img/pwa/favicon_32.ico',
341
- favicon_16_16: '/img/pwa/favicon_16.ico'
342
- },
343
- google_adsense: {
344
- enable: false,
345
- auto_ads: false,
346
- aside_card: false,
347
- post_card: false,
348
- post_content: false,
349
- enable_page_level_ads: false,
350
- js: 'https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js',
351
- client: '',
352
- slot: '',
353
- },
354
- right_menu: {
355
- enable: false,
356
- commentBarrage: false,
357
- ctrlOriginalMenu: false,
358
- translate: false,
359
- custom_list: []
360
- },
361
- lure: {
362
- enable: false,
363
- jump: '404 Not Found',
364
- back: 'ヾ(≧∇≦*)ゝ嘿嘿,上当了吧'
365
- },
366
- expire: {
367
- enable: false,
368
- time: 30,
369
- position: 'top',
370
- text_prev: '本文已于',
371
- text_next: '天前过期,如果内容不符,请联系站长更新。',
372
- },
373
- background: {
374
- enable: false,
375
- dark: 'https://bu.dusays.com/2023/09/29/651685ce667d1.jpg',
376
- light: 'https://bu.dusays.com/2023/09/29/651685cc18d39.jpg',
377
- opacity: 0.2,
378
- },
379
- translate: {
380
- enable: false,
381
- defaultEncoding: 2,
382
- translateDelay: 0,
383
- },
384
- rightside: {
385
- enable: false,
386
- percent: false,
387
- hide: {
269
+ comment: {
270
+ use: null,
271
+ commentBarrage: false,
272
+ lazyload: false,
273
+ count: false,
274
+ avatar: "https://gravatar.com/avatar",
275
+ hot_tip: {
276
+ enable: true,
277
+ count: 3,
278
+ },
279
+ },
280
+ twikoo: {
281
+ envId: "your envId",
282
+ region: null,
283
+ style: true,
284
+ accessToken: null,
285
+ option: null,
286
+ },
287
+ waline: {
288
+ envId: "your envId",
289
+ pageview: true,
290
+ option: null,
291
+ },
292
+ valine: {
293
+ appId: "your appId",
294
+ appKey: "your appKey",
295
+ serverURLs: "your serverURLs",
296
+ avatar: "monsterid",
297
+ visitor: false,
298
+ style: true,
299
+ option: null,
300
+ },
301
+ artalk: {
302
+ server: "your server",
303
+ site: "your site-name",
304
+ option: null,
305
+ },
306
+ console: {
388
307
  enable: false,
308
+ recentComment: {
309
+ enable: false,
310
+ storage: 0.2,
311
+ },
312
+ card: {
313
+ tags: true,
314
+ archive: true,
315
+ },
316
+ },
317
+ verify_site: [],
318
+ css_prefix: false,
319
+ font: {
320
+ "font-size": "16px",
321
+ "code-font-size": "16px",
322
+ "font-family":
323
+ "PingFang SC, Hiragino Sans GB,Microsoft YaHei, sans-serif",
324
+ "code-font-family": '"monospace", monospace',
325
+ },
326
+ extends: {
327
+ head: [],
328
+ body: [],
329
+ },
330
+ pwa: {
331
+ enable: false,
332
+ manifest: "/manifest.json",
333
+ theme_color: "#006a73",
334
+ mask_icon: "/img/pwa/favicon.ico",
335
+ apple_touch_icon: "/img/pwa/favicon.ico",
336
+ bookmark_icon: "/img/pwa/favicon.ico",
337
+ favicon_32_32: "/img/pwa/favicon_32.ico",
338
+ favicon_16_16: "/img/pwa/favicon_16.ico",
339
+ },
340
+ google_adsense: {
341
+ enable: false,
342
+ auto_ads: false,
343
+ aside_card: false,
344
+ post_card: false,
345
+ post_content: false,
346
+ enable_page_level_ads: false,
347
+ js: "https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js",
348
+ client: "",
349
+ slot: "",
350
+ },
351
+ right_menu: {
352
+ enable: false,
353
+ commentBarrage: false,
354
+ ctrlOriginalMenu: false,
389
355
  translate: false,
390
- mode: false
391
- }
392
- },
393
- CDN: {
394
- internal: 'local',
395
- third_party: 'cdnjs',
396
- version: true,
397
- custom_format: '//open.lightxi.com/cdnjs/ajax/libs/${cdnjs_name}/${version}/${min_cdnjs_file}',
398
- option: {}
399
- }
400
- };
356
+ custom_list: [],
357
+ },
358
+ lure: {
359
+ enable: false,
360
+ jump: "404 Not Found",
361
+ back: "ヾ(≧∇≦*)ゝ嘿嘿,上当了吧",
362
+ },
363
+ expire: {
364
+ enable: false,
365
+ time: 30,
366
+ position: "top",
367
+ text_prev: "本文已于",
368
+ text_next: "天前过期,如果内容不符,请联系站长更新。",
369
+ },
370
+ background: {
371
+ enable: false,
372
+ dark: "https://bu.dusays.com/2023/09/29/651685ce667d1.jpg",
373
+ light: "https://bu.dusays.com/2023/09/29/651685cc18d39.jpg",
374
+ opacity: 0.2,
375
+ },
376
+ translate: {
377
+ enable: false,
378
+ defaultEncoding: 2,
379
+ translateDelay: 0,
380
+ },
381
+ rightside: {
382
+ enable: false,
383
+ percent: false,
384
+ hide: {
385
+ enable: false,
386
+ translate: false,
387
+ mode: false,
388
+ },
389
+ },
390
+ CDN: {
391
+ internal: "local",
392
+ third_party: "cdnjs",
393
+ version: true,
394
+ custom_format:
395
+ "//open.lightxi.com/cdnjs/ajax/libs/${cdnjs_name}/${version}/${min_cdnjs_file}",
396
+ option: {},
397
+ },
398
+ };
401
399
 
402
- hexo.theme.config = { ...defaultConfig, ...hexo.theme.config };
403
- }, 1)
400
+ hexo.theme.config = { ...defaultConfig, ...hexo.theme.config };
401
+ },
402
+ 1
403
+ );