hexo-component-inferno 3.1.2 → 4.1.0

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 (161) hide show
  1. package/asset/js/algolia.js +51 -10
  2. package/asset/js/google_cse.js +50 -7
  3. package/asset/js/insight.js +48 -7
  4. package/lib/hexo/filter/locals.js +2 -2
  5. package/lib/hexo/helper/cdn.js +10 -2
  6. package/lib/schema/comment/artalk.json +37 -0
  7. package/lib/schema/comment/beaudar.json +62 -0
  8. package/lib/schema/comment/cusdis.json +34 -0
  9. package/lib/schema/comment/giscus.json +7 -1
  10. package/lib/schema/comment/utterances.json +15 -1
  11. package/lib/schema/comment/valine.json +2 -2
  12. package/lib/schema/comment/waline.json +1 -1
  13. package/lib/schema/plugin/matomo.json +25 -0
  14. package/lib/schema/plugin/umami.json +25 -0
  15. package/lib/schema/plugin/waline_pageview.json +14 -0
  16. package/lib/schema/search/algolia.json +4 -0
  17. package/lib/schema/widget/archives.json +5 -0
  18. package/lib/schema/widget/categories.json +5 -0
  19. package/lib/schema/widget/tags.json +1 -1
  20. package/lib/util/appearance.js +40 -0
  21. package/lib/util/i18n.js +24 -0
  22. package/lib/util/script.js +110 -0
  23. package/lib/view/comment/artalk.js +118 -0
  24. package/lib/view/comment/beaudar.js +133 -0
  25. package/lib/view/comment/changyan.js +5 -5
  26. package/lib/view/comment/cusdis.js +119 -0
  27. package/lib/view/comment/disqus.js +1 -1
  28. package/lib/view/comment/disqusjs.js +6 -5
  29. package/lib/view/comment/facebook.js +1 -1
  30. package/lib/view/comment/giscus.js +32 -22
  31. package/lib/view/comment/gitalk.js +6 -5
  32. package/lib/view/comment/gitment.js +6 -5
  33. package/lib/view/comment/isso.js +7 -3
  34. package/lib/view/comment/livere.js +1 -1
  35. package/lib/view/comment/twikoo.js +3 -4
  36. package/lib/view/comment/utterances.js +26 -17
  37. package/lib/view/comment/valine.js +3 -6
  38. package/lib/view/comment/waline.js +16 -9
  39. package/lib/view/common/article_media.js +2 -2
  40. package/lib/view/donate/afdian.js +1 -1
  41. package/lib/view/donate/alipay.js +1 -1
  42. package/lib/view/donate/buymeacoffee.js +1 -1
  43. package/lib/view/donate/patreon.js +1 -1
  44. package/lib/view/donate/paypal.js +1 -1
  45. package/lib/view/donate/wechat.js +1 -1
  46. package/lib/view/misc/article_licensing.js +1 -1
  47. package/lib/view/misc/meta.js +1 -1
  48. package/lib/view/misc/open_graph.js +1 -1
  49. package/lib/view/misc/paginator.js +9 -5
  50. package/lib/view/misc/structured_data.js +1 -1
  51. package/lib/view/misc/web_app.js +2 -2
  52. package/lib/view/plugin/baidu_analytics.js +1 -1
  53. package/lib/view/plugin/bing_webmaster.js +1 -1
  54. package/lib/view/plugin/busuanzi.js +1 -1
  55. package/lib/view/plugin/cnzz.js +1 -1
  56. package/lib/view/plugin/cookie_consent.js +1 -1
  57. package/lib/view/plugin/gallery.js +2 -2
  58. package/lib/view/plugin/google_analytics.js +1 -1
  59. package/lib/view/plugin/hotjar.js +1 -1
  60. package/lib/view/plugin/katex.js +1 -1
  61. package/lib/view/plugin/mathjax.js +1 -1
  62. package/lib/view/plugin/matomo.js +89 -0
  63. package/lib/view/plugin/outdated_browser.js +1 -1
  64. package/lib/view/plugin/progressbar.js +1 -1
  65. package/lib/view/plugin/statcounter.js +1 -1
  66. package/lib/view/plugin/twitter_conversion_tracking.js +1 -1
  67. package/lib/view/plugin/umami.js +88 -0
  68. package/lib/view/plugin/waline_pageview.js +98 -0
  69. package/lib/view/search/algolia.js +11 -5
  70. package/lib/view/search/baidu.js +5 -3
  71. package/lib/view/search/google_cse.js +4 -2
  72. package/lib/view/search/insight.js +1 -1
  73. package/lib/view/share/addthis.js +1 -1
  74. package/lib/view/share/addtoany.js +1 -1
  75. package/lib/view/share/bdshare.js +1 -1
  76. package/lib/view/share/sharejs.js +1 -1
  77. package/lib/view/share/sharethis.js +1 -1
  78. package/lib/view/widget/adsense.js +1 -1
  79. package/lib/view/widget/archives.js +45 -12
  80. package/lib/view/widget/categories.js +23 -7
  81. package/lib/view/widget/followit.js +1 -1
  82. package/lib/view/widget/links.js +1 -1
  83. package/lib/view/widget/recent_posts.js +1 -1
  84. package/lib/view/widget/subscribe_email.js +1 -1
  85. package/lib/view/widget/tags.js +19 -6
  86. package/lib/view/widget/toc.js +1 -1
  87. package/package.json +10 -5
  88. package/lib/core/migrate.test.js +0 -48
  89. package/lib/core/schema.test.js +0 -520
  90. package/lib/core/view.test.js +0 -41
  91. package/lib/hexo/filter/locals.test.js +0 -118
  92. package/lib/hexo/generator/assets.test.js +0 -32
  93. package/lib/hexo/generator/categories.test.js +0 -41
  94. package/lib/hexo/generator/category.test.js +0 -84
  95. package/lib/hexo/generator/insight.test.js +0 -95
  96. package/lib/hexo/generator/manifest.test.js +0 -52
  97. package/lib/hexo/generator/tags.test.js +0 -41
  98. package/lib/hexo/helper/cdn.test.js +0 -128
  99. package/lib/hexo/helper/page.test.js +0 -62
  100. package/lib/hexo/tag/message.test.js +0 -72
  101. package/lib/hexo/tag/tabs.test.js +0 -98
  102. package/lib/schema/schema/comment/changyan.json +0 -21
  103. package/lib/schema/schema/comment/disqus.json +0 -17
  104. package/lib/schema/schema/comment/disqusjs.json +0 -53
  105. package/lib/schema/schema/comment/facebook.json +0 -13
  106. package/lib/schema/schema/comment/giscus.json +0 -105
  107. package/lib/schema/schema/comment/gitalk.json +0 -81
  108. package/lib/schema/schema/comment/gitment.json +0 -47
  109. package/lib/schema/schema/comment/isso.json +0 -17
  110. package/lib/schema/schema/comment/livere.json +0 -17
  111. package/lib/schema/schema/comment/twikoo.json +0 -28
  112. package/lib/schema/schema/comment/utterances.json +0 -59
  113. package/lib/schema/schema/comment/valine.json +0 -105
  114. package/lib/schema/schema/comment/waline.json +0 -176
  115. package/lib/schema/schema/donate/afdian.json +0 -17
  116. package/lib/schema/schema/donate/alipay.json +0 -17
  117. package/lib/schema/schema/donate/buymeacoffee.json +0 -17
  118. package/lib/schema/schema/donate/patreon.json +0 -17
  119. package/lib/schema/schema/donate/paypal.json +0 -22
  120. package/lib/schema/schema/donate/wechat.json +0 -17
  121. package/lib/schema/schema/misc/manifest.json +0 -66
  122. package/lib/schema/schema/misc/meta.json +0 -11
  123. package/lib/schema/schema/misc/open_graph.json +0 -78
  124. package/lib/schema/schema/misc/poly_links.json +0 -35
  125. package/lib/schema/schema/misc/structured_data.json +0 -47
  126. package/lib/schema/schema/plugin/baidu_analytics.json +0 -14
  127. package/lib/schema/schema/plugin/bing_webmaster.json +0 -14
  128. package/lib/schema/schema/plugin/busuanzi.json +0 -7
  129. package/lib/schema/schema/plugin/cnzz.json +0 -19
  130. package/lib/schema/schema/plugin/cookie_consent.json +0 -38
  131. package/lib/schema/schema/plugin/gallery.json +0 -7
  132. package/lib/schema/schema/plugin/google_analytics.json +0 -14
  133. package/lib/schema/schema/plugin/hotjar.json +0 -14
  134. package/lib/schema/schema/plugin/katex.json +0 -7
  135. package/lib/schema/schema/plugin/mathjax.json +0 -7
  136. package/lib/schema/schema/plugin/outdated_browser.json +0 -7
  137. package/lib/schema/schema/plugin/progressbar.json +0 -7
  138. package/lib/schema/schema/plugin/statcounter.json +0 -19
  139. package/lib/schema/schema/plugin/twitter_conversion_tracking.json +0 -14
  140. package/lib/schema/schema/search/algolia.json +0 -13
  141. package/lib/schema/schema/search/baidu.json +0 -13
  142. package/lib/schema/schema/search/google_cse.json +0 -17
  143. package/lib/schema/schema/search/insight.json +0 -19
  144. package/lib/schema/schema/share/addthis.json +0 -17
  145. package/lib/schema/schema/share/addtoany.json +0 -13
  146. package/lib/schema/schema/share/bdshare.json +0 -13
  147. package/lib/schema/schema/share/sharejs.json +0 -13
  148. package/lib/schema/schema/share/sharethis.json +0 -17
  149. package/lib/schema/schema/widget/adsense.json +0 -21
  150. package/lib/schema/schema/widget/archives.json +0 -13
  151. package/lib/schema/schema/widget/categories.json +0 -13
  152. package/lib/schema/schema/widget/followit.json +0 -26
  153. package/lib/schema/schema/widget/links.json +0 -47
  154. package/lib/schema/schema/widget/recent_posts.json +0 -13
  155. package/lib/schema/schema/widget/subscribe_email.json +0 -22
  156. package/lib/schema/schema/widget/tags.json +0 -30
  157. package/lib/schema/schema/widget/toc.json +0 -31
  158. package/lib/util/cache.test.js +0 -24
  159. package/lib/util/classname.test.js +0 -13
  160. package/lib/util/yaml.test.js +0 -18
  161. package/lib/view/widget/toc.test.js +0 -30
@@ -1,72 +0,0 @@
1
- const {
2
- join
3
- } = require('path');
4
- const Hexo = require('hexo');
5
- const cheerio = require('cheerio');
6
- const {
7
- minify
8
- } = require('html-minifier');
9
- const register = require('./message');
10
- const rootDir = join(__dirname, '../../../fixture/site');
11
- const hexo = new Hexo(rootDir, {
12
- silent: true
13
- });
14
- const cheerioOptions = {
15
- xml: {
16
- normalizeWhitespace: true
17
- }
18
- };
19
- const minifierOptions = {
20
- collapseWhitespace: true,
21
- conservativeCollapse: true,
22
- keepClosingSlash: true
23
- };
24
- beforeAll(async () => {
25
- await hexo.init();
26
- await hexo.load();
27
- register(hexo);
28
- await hexo.loadPlugin(require.resolve('hexo-renderer-marked'));
29
- });
30
- test('create default message', async () => {
31
- const render = hexo.extend.tag.render.bind(hexo.extend.tag);
32
- let source = '{% message %}**content**{% endmessage %}';
33
- let actual = cheerio.load(await render(source), cheerioOptions, false).html();
34
- expect(minify(actual, minifierOptions)).toEqual('<article class="message"> <div class="message-body"> ' + '<p><strong>content</strong></p> </div> </article>');
35
- source = '{% message %}\n# title\n{% endmessage %}';
36
- actual = cheerio.load(await render(source), cheerioOptions, false).html();
37
- expect(minify(actual, minifierOptions)).toEqual('<article class="message"> <div class="message-body"> ' + '<h1 id="title"><a href="#title" class="headerlink" title="title"/>title</h1> ' + '</div> </article>');
38
- });
39
- test('create message with different colors', async () => {
40
- const render = hexo.extend.tag.render.bind(hexo.extend.tag);
41
- for (const color of ['dark', 'primary', 'link', 'info', 'success', 'warning', 'danger']) {
42
- const source = `{% message color:${color} %}content{% endmessage %}`;
43
- const actual = cheerio.load(await render(source), cheerioOptions, false).html();
44
- expect(minify(actual, minifierOptions)).toEqual(`<article class="message is-${color}"> <div class="message-body"> <p>content</p> ` + '</div> </article>');
45
- }
46
- });
47
- test('create message with different sizes', async () => {
48
- const render = hexo.extend.tag.render.bind(hexo.extend.tag);
49
- for (const size of ['small', 'medium', 'large']) {
50
- const source = `{% message size:${size} %}content{% endmessage %}`;
51
- const actual = cheerio.load(await render(source), cheerioOptions, false).html();
52
- expect(minify(actual, minifierOptions)).toEqual(`<article class="message is-${size}"> <div class="message-body"> <p>content</p> ` + '</div> </article>');
53
- }
54
- });
55
- test('create message with an icon', async () => {
56
- const render = hexo.extend.tag.render.bind(hexo.extend.tag);
57
- const source = '{% message "icon:fas fas-file" %}content{% endmessage %}';
58
- const actual = cheerio.load(await render(source), cheerioOptions, false).html();
59
- expect(minify(actual, minifierOptions)).toEqual('<article class="message"> <div class="message-header"><p>' + '<i class="fas fas-file mr-2"/></p> </div> <div class="message-body"> <p>content</p> ' + '</div> </article>');
60
- });
61
- test('create message with a title', async () => {
62
- const render = hexo.extend.tag.render.bind(hexo.extend.tag);
63
- const source = '{% message "title:*message title*" %}content{% endmessage %}';
64
- const actual = cheerio.load(await render(source), cheerioOptions, false).html();
65
- expect(minify(actual, minifierOptions)).toEqual('<article class="message"> <div class="message-header"><p>' + '<em>message title</em></p> </div> <div class="message-body"> <p>content</p> ' + '</div> </article>');
66
- });
67
- test('create message with all properties', async () => {
68
- const render = hexo.extend.tag.render.bind(hexo.extend.tag);
69
- const source = '{% message color:success size:small "icon:fas fas-file" ' + '"title:*message title*" %}content{% endmessage %}';
70
- const actual = cheerio.load(await render(source), cheerioOptions, false).html();
71
- expect(minify(actual, minifierOptions)).toEqual('<article class="message is-success is-small"> <div class="message-header"><p>' + '<i class="fas fas-file mr-2"/><em>message title</em></p> </div> ' + '<div class="message-body"> <p>content</p> </div> </article>');
72
- });
@@ -1,98 +0,0 @@
1
- const {
2
- join
3
- } = require('path');
4
- const Hexo = require('hexo');
5
- const {
6
- minify
7
- } = require('html-minifier');
8
- const cheerio = require('cheerio');
9
- const register = require('./tabs');
10
- const rootDir = join(__dirname, '../../../fixture/site');
11
- const hexo = new Hexo(rootDir, {
12
- silent: true
13
- });
14
- const cheerioOptions = {
15
- xml: {
16
- normalizeWhitespace: true
17
- }
18
- };
19
- const minifierOptions = {
20
- collapseWhitespace: true,
21
- conservativeCollapse: true,
22
- keepClosingSlash: true
23
- };
24
- beforeAll(async () => {
25
- await hexo.init();
26
- await hexo.load();
27
- register(hexo);
28
- await hexo.loadPlugin(require.resolve('hexo-renderer-marked'));
29
- });
30
- test('create default tabs', async () => {
31
- const render = hexo.extend.tag.render.bind(hexo.extend.tag);
32
- let source = '{% tabs %}<!--tab id:tab1-->**content**<!--endtab-->{% endtabs %}';
33
- let actual = cheerio.load(await render(source), cheerioOptions, false).html();
34
- expect(minify(actual, minifierOptions)).toEqual('<div class="tabs my-3"> <ul class="mx-0 my-0"> <li> <a href="#tab1"> </a> </li> </ul> ' + '</div> <div id="tab1" class="tab-content is-hidden"> <p><strong>content</strong></p> </div>');
35
- source = `{% tabs %}
36
- <!-- tab --># title 1<!-- endtab -->
37
- <!-- tab --># title 2<!-- endtab -->
38
- {% endtabs %}`;
39
- const $ = cheerio.load(await render(source), cheerioOptions, false);
40
- const [tabId1, tabId2] = $('.tab-content').get().map(element => $(element).attr('id'));
41
- actual = $.html();
42
- expect(minify(actual, minifierOptions)).toEqual(`<div class="tabs my-3"> <ul class="mx-0 my-0"> <li> <a href="#${tabId1}"> </a> ` + `</li><li> <a href="#${tabId2}"> </a> </li> </ul> </div> ` + `<div id="${tabId1}" class="tab-content is-hidden"> <h1 id="title-1">` + '<a href="#title-1" class="headerlink" title="title 1"/>title 1</h1> </div>' + `<div id="${tabId2}" class="tab-content is-hidden"> <h1 id="title-2">` + '<a href="#title-2" class="headerlink" title="title 2"/>title 2</h1> </div>');
43
- });
44
- test('create tabs with different alignment', async () => {
45
- const render = hexo.extend.tag.render.bind(hexo.extend.tag);
46
- for (const align of ['left', 'centered', 'right', 'fullwidth']) {
47
- const source = `{% tabs align:${align} %}<!--tab id:tab1-->content<!--endtab-->{% endtabs %}`;
48
- const actual = cheerio.load(await render(source), cheerioOptions, false).html();
49
- expect(minify(actual, minifierOptions)).toEqual(`<div class="tabs my-3 is-${align}"> <ul class="mx-0 my-0"> <li> <a href="#tab1"> </a> ` + '</li> </ul> </div> <div id="tab1" class="tab-content is-hidden"> ' + '<p>content</p> </div>');
50
- }
51
- });
52
- test('create tabs with different sizes', async () => {
53
- const render = hexo.extend.tag.render.bind(hexo.extend.tag);
54
- for (const size of ['small', 'medium', 'large']) {
55
- const source = `{% tabs size:${size} %}<!--tab id:tab1-->content<!--endtab-->{% endtabs %}`;
56
- const actual = cheerio.load(await render(source), cheerioOptions, false).html();
57
- expect(minify(actual, minifierOptions)).toEqual(`<div class="tabs my-3 is-${size}"> <ul class="mx-0 my-0"> <li> <a href="#tab1"> </a> ` + '</li> </ul> </div> <div id="tab1" class="tab-content is-hidden"> ' + '<p>content</p> </div>');
58
- }
59
- });
60
- test('create tabs with different styles', async () => {
61
- const render = hexo.extend.tag.render.bind(hexo.extend.tag);
62
- for (const style of ['boxed', 'toggle', 'toggle-rounded']) {
63
- const source = `{% tabs style:${style} %}<!--tab id:tab1-->content<!--endtab-->{% endtabs %}`;
64
- const actual = cheerio.load(await render(source), cheerioOptions, false).html();
65
- const classname = style === 'toggle-rounded' ? 'toggle is-toggle-rounded' : style;
66
- expect(minify(actual, minifierOptions)).toEqual(`<div class="tabs my-3 is-${classname}"> <ul class="mx-0 my-0"> <li> <a href="#tab1"> </a> ` + '</li> </ul> </div> <div id="tab1" class="tab-content is-hidden"> ' + '<p>content</p> </div>');
67
- }
68
- });
69
- test('create tabs with active status', async () => {
70
- const render = hexo.extend.tag.render.bind(hexo.extend.tag);
71
- const source = `{% tabs %}
72
- <!-- tab id:tab1 -->tab 1<!-- endtab -->
73
- <!-- tab id:tab2 active -->tab 2<!-- endtab -->
74
- {% endtabs %}`;
75
- const actual = cheerio.load(await render(source), cheerioOptions, false).html();
76
- expect(minify(actual, minifierOptions)).toEqual('<div class="tabs my-3"> <ul class="mx-0 my-0"> <li> <a href="#tab1"> </a> ' + '</li><li class="is-active"> <a href="#tab2"> </a> </li> </ul> </div> ' + '<div id="tab1" class="tab-content is-hidden"> <p>tab 1</p> </div>' + '<div id="tab2" class="tab-content"> <p>tab 2</p> </div>');
77
- });
78
- test('create tabs with a title', async () => {
79
- const render = hexo.extend.tag.render.bind(hexo.extend.tag);
80
- const source = '{% tabs %}<!--tab id:tab1 "title:Tab Title"-->tab<!--endtab-->{% endtabs %}';
81
- const actual = cheerio.load(await render(source), cheerioOptions, false).html();
82
- expect(minify(actual, minifierOptions)).toEqual('<div class="tabs my-3"> <ul class="mx-0 my-0"> <li> <a href="#tab1"> <p>Tab Title</p> </a> ' + '</li> </ul> </div> <div id="tab1" class="tab-content is-hidden"> <p>tab</p> </div>');
83
- });
84
- test('create tabs with an icon', async () => {
85
- const render = hexo.extend.tag.render.bind(hexo.extend.tag);
86
- const source = '{% tabs %}<!--tab id:tab1 "icon:fab fa-github"-->tab<!--endtab-->{% endtabs %}';
87
- const actual = cheerio.load(await render(source), cheerioOptions, false).html();
88
- expect(minify(actual, minifierOptions)).toEqual('<div class="tabs my-3"> <ul class="mx-0 my-0"> <li> <a href="#tab1"> ' + '<span class="icon is-small ml-0"> <i class="fab fa-github" aria-hidden="true"/> ' + '</span> </a> </li> </ul> </div> <div id="tab1" class="tab-content is-hidden"> ' + '<p>tab</p> </div>');
89
- });
90
- test('create tabs with all properties', async () => {
91
- const render = hexo.extend.tag.render.bind(hexo.extend.tag);
92
- const source = `{% tabs align:fullwidth 'size:large' style:boxed %}
93
- <!-- tab id:tab1 "icon:fas\\ fa-file" -->tab 1<!-- endtab -->
94
- <!-- tab id:tab2 active 'title:Tim\\'s Tab' -->tab 2<!-- endtab -->
95
- {% endtabs %}`;
96
- const actual = cheerio.load(await render(source), cheerioOptions, false).html();
97
- expect(minify(actual, minifierOptions)).toEqual('<div class="tabs my-3 is-fullwidth is-large is-boxed"> <ul class="mx-0 my-0"> <li> ' + '<a href="#tab1"> <span class="icon is-small ml-0"> ' + '<i class="fas\\ fa-file" aria-hidden="true"/> </span> </a> </li><li class="is-active"> ' + '<a href="#tab2"> <p>Tim&apos;s Tab</p> </a> </li> </ul> </div> ' + '<div id="tab1" class="tab-content is-hidden"> <p>tab 1</p> </div>' + '<div id="tab2" class="tab-content"> <p>tab 2</p> </div>');
98
- });
@@ -1,21 +0,0 @@
1
- {
2
- "$schema": "http://json-schema.org/draft-07/schema#",
3
- "$id": "/comment/changyan.json",
4
- "description": "Changyan comment plugin configurations",
5
- "type": "object",
6
- "properties": {
7
- "type": {
8
- "type": "string",
9
- "const": "changyan"
10
- },
11
- "app_id": {
12
- "type": "string",
13
- "description": "Changyan app ID"
14
- },
15
- "conf": {
16
- "type": "string",
17
- "description": "Changyan configuration ID"
18
- }
19
- },
20
- "required": ["type", "app_id", "conf"]
21
- }
@@ -1,17 +0,0 @@
1
- {
2
- "$schema": "http://json-schema.org/draft-07/schema#",
3
- "$id": "/comment/disqus.json",
4
- "description": "Disqus comment plugin configurations",
5
- "type": "object",
6
- "properties": {
7
- "type": {
8
- "type": "string",
9
- "const": "disqus"
10
- },
11
- "shortname": {
12
- "type": "string",
13
- "description": "Disqus shortname"
14
- }
15
- },
16
- "required": ["type", "shortname"]
17
- }
@@ -1,53 +0,0 @@
1
- {
2
- "$schema": "http://json-schema.org/draft-07/schema#",
3
- "$id": "/comment/disqusjs.json",
4
- "description": "DisqusJS comment plugin configurations",
5
- "type": "object",
6
- "properties": {
7
- "type": {
8
- "type": "string",
9
- "const": "disqusjs"
10
- },
11
- "shortname": {
12
- "type": "string",
13
- "description": "Disqus shortname"
14
- },
15
- "api_key": {
16
- "description": "Disqus application API key",
17
- "anyOf": [
18
- {
19
- "type": "string"
20
- },
21
- {
22
- "type": "array",
23
- "minItems": 1,
24
- "items": {
25
- "type": "string"
26
- }
27
- }
28
- ]
29
- },
30
- "api": {
31
- "type": "string",
32
- "description": "Disqus API endpoint"
33
- },
34
- "admin": {
35
- "type": "string",
36
- "description": "Disqus moderator username",
37
- "nullable": true
38
- },
39
- "admin_label": {
40
- "type": "string",
41
- "description": "Disqus moderator badge text",
42
- "default": false,
43
- "nullable": true
44
- },
45
- "nesting": {
46
- "type": "integer",
47
- "description": "Maximum number of comment nesting level",
48
- "default": 4,
49
- "nullable": true
50
- }
51
- },
52
- "required": ["type", "shortname", "api_key"]
53
- }
@@ -1,13 +0,0 @@
1
- {
2
- "$schema": "http://json-schema.org/draft-07/schema#",
3
- "$id": "/comment/facebook.json",
4
- "description": "Facebook comment plugin configurations",
5
- "type": "object",
6
- "properties": {
7
- "type": {
8
- "type": "string",
9
- "const": "facebook"
10
- }
11
- },
12
- "required": ["type"]
13
- }
@@ -1,105 +0,0 @@
1
- {
2
- "$schema": "http://json-schema.org/draft-07/schema#",
3
- "$id": "/comment/giscus.json",
4
- "description": "Giscus comment plugin configurations",
5
- "type": "object",
6
- "properties": {
7
- "type": {
8
- "type": "string",
9
- "const": "giscus"
10
- },
11
- "repo": {
12
- "type": "string",
13
- "description": "GitHub repository to which Giscus connects"
14
- },
15
- "repoId": {
16
- "type": "string",
17
- "description": "GitHub repository id to which Giscus connects"
18
- },
19
- "category": {
20
- "type": "string",
21
- "description": "The discussion category where new discussions will be created",
22
- "default": "Announcements",
23
- "nullable": true
24
- },
25
- "categoryId": {
26
- "type": "string",
27
- "description": "Id code of the category of Github discussions which Giscus will access to"
28
- },
29
- "mapping": {
30
- "type": "string",
31
- "description": "The mapping between the embedding page and the embedded discussion",
32
- "enum": ["pathname", "url", "title", "og:title", "specific", "number"],
33
- "default": "pathname",
34
- "nullable": true
35
- },
36
- "strict": {
37
- "type": "boolean",
38
- "description": "Avoid mismatches due to GitHub's fuzzy searching method when there are multiple discussions with similar titles",
39
- "default": false,
40
- "nullable": true
41
- },
42
- "reactionsEnabled": {
43
- "type": "boolean",
44
- "description": "Whether enable reactions",
45
- "default": false,
46
- "nullable": true
47
- },
48
- "emitMetadata": {
49
- "type": "boolean",
50
- "description": "Whether will discussion emit metadata",
51
- "default": false,
52
- "nullable": true
53
- },
54
- "inputPosition": {
55
- "type": "string",
56
- "description": "Where the input block will display",
57
- "enum": ["top", "bottom"],
58
- "default": "top",
59
- "nullable": true
60
- },
61
- "theme": {
62
- "type": "string",
63
- "description": "Giscus look and feel",
64
- "enum": [
65
- "light",
66
- "light_high_contrast",
67
- "light_protanopia",
68
- "light_tritanopia",
69
- "dark",
70
- "dark_high_contrast",
71
- "dark_protanopia",
72
- "dark_tritanopia",
73
- "dark_dimmed",
74
- "preferred_color_scheme",
75
- "transparent_dark",
76
- "noborder_light",
77
- "noborder_dark",
78
- "noborder_gray",
79
- "cobalt",
80
- "purple_dark",
81
- "custom"
82
- ],
83
- "default": "noborder_light",
84
- "nullable": true
85
- },
86
- "customThemeCss": {
87
- "type": "string",
88
- "description": "The url of custom Giscus theme css, only affect when theme is set to custom",
89
- "nullable": true
90
- },
91
- "lang": {
92
- "type": "string",
93
- "description": "Language of Giscus",
94
- "default": "en",
95
- "nullable": true
96
- },
97
- "lazy": {
98
- "type": "boolean",
99
- "description": "Loading of the comments will be deferred until the user scrolls near the comments container",
100
- "default": false,
101
- "nullable": true
102
- }
103
- },
104
- "required": ["repo", "repoId", "categoryId"]
105
- }
@@ -1,81 +0,0 @@
1
- {
2
- "$schema": "http://json-schema.org/draft-07/schema#",
3
- "$id": "/comment/gitalk.json",
4
- "description": "Gitalk comment plugin configurations",
5
- "type": "object",
6
- "properties": {
7
- "type": {
8
- "type": "string",
9
- "const": "gitalk"
10
- },
11
- "client_id": {
12
- "type": "string",
13
- "description": "GitHub application client ID"
14
- },
15
- "client_secret": {
16
- "type": "string",
17
- "description": "GitHub application client secret"
18
- },
19
- "repo": {
20
- "type": "string",
21
- "description": "GitHub repository"
22
- },
23
- "owner": {
24
- "type": "string",
25
- "description": "GitHub repository owner. Can be personal user or organization"
26
- },
27
- "admin": {
28
- "type": "array",
29
- "description": "GitHub repository owner and collaborators. (Users who having write access to this repository)",
30
- "items": {
31
- "type": "string"
32
- }
33
- },
34
- "per_page": {
35
- "type": "number",
36
- "description": "Pagination size, with maximum 100",
37
- "default": 10,
38
- "nullable": true
39
- },
40
- "distraction_free_mode": {
41
- "type": "boolean",
42
- "description": "Facebook-like distraction free mode",
43
- "default": false,
44
- "nullable": true
45
- },
46
- "pager_direction": {
47
- "type": "string",
48
- "description": "Comment sorting direction, available values are `last` and `first`",
49
- "default": "last",
50
- "nullable": true
51
- },
52
- "create_issue_manually": {
53
- "type": "boolean",
54
- "description": "Create GitHub issues manually for each page",
55
- "default": false,
56
- "nullable": true
57
- },
58
- "proxy": {
59
- "type": "string",
60
- "description": "GitHub oauth request reverse proxy for CORS",
61
- "nullable": true
62
- },
63
- "flip_move_options": {
64
- "type": "object",
65
- "description": "Comment list animation",
66
- "nullable": true
67
- },
68
- "enable_hotkey": {
69
- "type": "boolean",
70
- "description": "Enable hot key (cmd|ctrl + enter) submit comment",
71
- "default": true,
72
- "nullable": true
73
- },
74
- "language": {
75
- "type": "string",
76
- "description": "Name of the supported language",
77
- "nullable": true
78
- }
79
- },
80
- "required": ["type", "client_id", "client_secret", "repo", "owner", "admin"]
81
- }
@@ -1,47 +0,0 @@
1
- {
2
- "$schema": "http://json-schema.org/draft-07/schema#",
3
- "$id": "/comment/gitment.json",
4
- "description": "Gitment comment plugin configurations",
5
- "type": "object",
6
- "properties": {
7
- "type": {
8
- "type": "string",
9
- "const": "gitment"
10
- },
11
- "owner": {
12
- "type": "string",
13
- "description": "Your GitHub ID"
14
- },
15
- "repo": {
16
- "type": "string",
17
- "description": "The repository to store your comments. Make sure you're repo's owner"
18
- },
19
- "client_id": {
20
- "type": "string",
21
- "description": "GitHub client ID"
22
- },
23
- "client_secret": {
24
- "type": "string",
25
- "description": "GitHub client secret"
26
- },
27
- "theme": {
28
- "type": "string",
29
- "description": "An optional Gitment theme object",
30
- "default": "gitment.defaultTheme",
31
- "nullable": true
32
- },
33
- "per_page": {
34
- "type": "number",
35
- "description": "An optional number to which comments will be paginated",
36
- "default": 20,
37
- "nullable": true
38
- },
39
- "max_comment_height": {
40
- "type": "number",
41
- "description": "An optional number to limit comments' max height, over which comments will be folded",
42
- "default": 250,
43
- "nullable": true
44
- }
45
- },
46
- "required": ["type", "owner", "repo", "client_id", "client_secret"]
47
- }
@@ -1,17 +0,0 @@
1
- {
2
- "$schema": "http://json-schema.org/draft-07/schema#",
3
- "$id": "/comment/isso.json",
4
- "description": "Isso comment plugin configurations",
5
- "type": "object",
6
- "properties": {
7
- "type": {
8
- "type": "string",
9
- "const": "isso"
10
- },
11
- "url": {
12
- "type": "string",
13
- "description": "URL to your Isso comment service"
14
- }
15
- },
16
- "required": ["type", "url"]
17
- }
@@ -1,17 +0,0 @@
1
- {
2
- "$schema": "http://json-schema.org/draft-07/schema#",
3
- "$id": "/comment/livere.json",
4
- "description": "Livere comment plugin configurations",
5
- "type": "object",
6
- "properties": {
7
- "type": {
8
- "type": "string",
9
- "const": "livere"
10
- },
11
- "uid": {
12
- "type": "string",
13
- "description": "LiveRe comment service UID"
14
- }
15
- },
16
- "required": ["type", "uid"]
17
- }
@@ -1,28 +0,0 @@
1
- {
2
- "$schema": "http://json-schema.org/draft-07/schema#",
3
- "$id": "/comment/twikoo.json",
4
- "description": "Twikoo comment plugin configurations",
5
- "type": "object",
6
- "properties": {
7
- "type": {
8
- "type": "string",
9
- "const": "twikoo"
10
- },
11
- "env_id": {
12
- "type": "string",
13
- "description": "envId from Tencent CloudBase or Vercel URL"
14
- },
15
- "region": {
16
- "type": "string",
17
- "description": "Region of Tencent CloudBase",
18
- "nullable": true
19
- },
20
- "lang": {
21
- "type": "string",
22
- "description": "i18n support",
23
- "default": "zh-CN",
24
- "nullable": true
25
- }
26
- },
27
- "required": ["type", "env_id"]
28
- }
@@ -1,59 +0,0 @@
1
- {
2
- "$schema": "http://json-schema.org/draft-07/schema#",
3
- "$id": "/comment/utterances.json",
4
- "description": "Utterances comment plugin configurations",
5
- "type": "object",
6
- "properties": {
7
- "type": {
8
- "type": "string",
9
- "const": "utterances"
10
- },
11
- "repo": {
12
- "type": "string",
13
- "description": "GitHub repository to which Utterances connects"
14
- },
15
- "label": {
16
- "type": "string",
17
- "description": "Label assigned to issues created by Utterances",
18
- "nullable": true
19
- },
20
- "theme": {
21
- "type": "string",
22
- "description": "Utterances look and feel",
23
- "enum": [
24
- "github-light",
25
- "github-dark",
26
- "github-dark-orange",
27
- "icy-dark",
28
- "dark-blue",
29
- "photon-dark"
30
- ],
31
- "default": "github-light",
32
- "nullable": true
33
- }
34
- },
35
- "required": ["type", "repo"],
36
- "oneOf": [
37
- {
38
- "type": "object",
39
- "properties": {
40
- "issue_term": {
41
- "type": "string",
42
- "description": "The mapping between blog posts and GitHub issues",
43
- "default": "pathname"
44
- }
45
- },
46
- "required": ["issue_term"]
47
- },
48
- {
49
- "type": "object",
50
- "properties": {
51
- "issue_number": {
52
- "type": "integer",
53
- "description": "Configure Utterances to load a specific issue by number"
54
- }
55
- },
56
- "required": ["issue_number"]
57
- }
58
- ]
59
- }