hexo-component-inferno 3.1.2 → 4.0.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 (144) 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/schema/comment/valine.json +2 -2
  6. package/lib/schema/plugin/matomo.json +25 -0
  7. package/lib/schema/plugin/umami.json +25 -0
  8. package/lib/schema/search/algolia.json +4 -0
  9. package/lib/util/script.js +65 -0
  10. package/lib/view/comment/changyan.js +5 -5
  11. package/lib/view/comment/disqus.js +1 -1
  12. package/lib/view/comment/disqusjs.js +6 -5
  13. package/lib/view/comment/facebook.js +1 -1
  14. package/lib/view/comment/giscus.js +1 -1
  15. package/lib/view/comment/gitalk.js +6 -5
  16. package/lib/view/comment/gitment.js +6 -5
  17. package/lib/view/comment/isso.js +7 -3
  18. package/lib/view/comment/livere.js +1 -1
  19. package/lib/view/comment/twikoo.js +3 -4
  20. package/lib/view/comment/utterances.js +1 -1
  21. package/lib/view/comment/valine.js +3 -6
  22. package/lib/view/comment/waline.js +8 -7
  23. package/lib/view/common/article_media.js +2 -2
  24. package/lib/view/donate/afdian.js +1 -1
  25. package/lib/view/donate/alipay.js +1 -1
  26. package/lib/view/donate/buymeacoffee.js +1 -1
  27. package/lib/view/donate/patreon.js +1 -1
  28. package/lib/view/donate/paypal.js +1 -1
  29. package/lib/view/donate/wechat.js +1 -1
  30. package/lib/view/misc/article_licensing.js +1 -1
  31. package/lib/view/misc/meta.js +1 -1
  32. package/lib/view/misc/open_graph.js +1 -1
  33. package/lib/view/misc/paginator.js +9 -5
  34. package/lib/view/misc/structured_data.js +1 -1
  35. package/lib/view/misc/web_app.js +2 -2
  36. package/lib/view/plugin/baidu_analytics.js +1 -1
  37. package/lib/view/plugin/bing_webmaster.js +1 -1
  38. package/lib/view/plugin/busuanzi.js +1 -1
  39. package/lib/view/plugin/cnzz.js +1 -1
  40. package/lib/view/plugin/cookie_consent.js +1 -1
  41. package/lib/view/plugin/gallery.js +2 -2
  42. package/lib/view/plugin/google_analytics.js +1 -1
  43. package/lib/view/plugin/hotjar.js +1 -1
  44. package/lib/view/plugin/katex.js +1 -1
  45. package/lib/view/plugin/mathjax.js +1 -1
  46. package/lib/view/plugin/matomo.js +89 -0
  47. package/lib/view/plugin/outdated_browser.js +1 -1
  48. package/lib/view/plugin/progressbar.js +1 -1
  49. package/lib/view/plugin/statcounter.js +1 -1
  50. package/lib/view/plugin/twitter_conversion_tracking.js +1 -1
  51. package/lib/view/plugin/umami.js +88 -0
  52. package/lib/view/search/algolia.js +11 -5
  53. package/lib/view/search/baidu.js +5 -3
  54. package/lib/view/search/google_cse.js +4 -2
  55. package/lib/view/search/insight.js +1 -1
  56. package/lib/view/share/addthis.js +1 -1
  57. package/lib/view/share/addtoany.js +1 -1
  58. package/lib/view/share/bdshare.js +1 -1
  59. package/lib/view/share/sharejs.js +1 -1
  60. package/lib/view/share/sharethis.js +1 -1
  61. package/lib/view/widget/adsense.js +1 -1
  62. package/lib/view/widget/archives.js +23 -5
  63. package/lib/view/widget/categories.js +1 -1
  64. package/lib/view/widget/followit.js +1 -1
  65. package/lib/view/widget/links.js +1 -1
  66. package/lib/view/widget/recent_posts.js +1 -1
  67. package/lib/view/widget/subscribe_email.js +1 -1
  68. package/lib/view/widget/tags.js +1 -1
  69. package/lib/view/widget/toc.js +1 -1
  70. package/package.json +10 -5
  71. package/lib/core/migrate.test.js +0 -48
  72. package/lib/core/schema.test.js +0 -520
  73. package/lib/core/view.test.js +0 -41
  74. package/lib/hexo/filter/locals.test.js +0 -118
  75. package/lib/hexo/generator/assets.test.js +0 -32
  76. package/lib/hexo/generator/categories.test.js +0 -41
  77. package/lib/hexo/generator/category.test.js +0 -84
  78. package/lib/hexo/generator/insight.test.js +0 -95
  79. package/lib/hexo/generator/manifest.test.js +0 -52
  80. package/lib/hexo/generator/tags.test.js +0 -41
  81. package/lib/hexo/helper/cdn.test.js +0 -128
  82. package/lib/hexo/helper/page.test.js +0 -62
  83. package/lib/hexo/tag/message.test.js +0 -72
  84. package/lib/hexo/tag/tabs.test.js +0 -98
  85. package/lib/schema/schema/comment/changyan.json +0 -21
  86. package/lib/schema/schema/comment/disqus.json +0 -17
  87. package/lib/schema/schema/comment/disqusjs.json +0 -53
  88. package/lib/schema/schema/comment/facebook.json +0 -13
  89. package/lib/schema/schema/comment/giscus.json +0 -105
  90. package/lib/schema/schema/comment/gitalk.json +0 -81
  91. package/lib/schema/schema/comment/gitment.json +0 -47
  92. package/lib/schema/schema/comment/isso.json +0 -17
  93. package/lib/schema/schema/comment/livere.json +0 -17
  94. package/lib/schema/schema/comment/twikoo.json +0 -28
  95. package/lib/schema/schema/comment/utterances.json +0 -59
  96. package/lib/schema/schema/comment/valine.json +0 -105
  97. package/lib/schema/schema/comment/waline.json +0 -176
  98. package/lib/schema/schema/donate/afdian.json +0 -17
  99. package/lib/schema/schema/donate/alipay.json +0 -17
  100. package/lib/schema/schema/donate/buymeacoffee.json +0 -17
  101. package/lib/schema/schema/donate/patreon.json +0 -17
  102. package/lib/schema/schema/donate/paypal.json +0 -22
  103. package/lib/schema/schema/donate/wechat.json +0 -17
  104. package/lib/schema/schema/misc/manifest.json +0 -66
  105. package/lib/schema/schema/misc/meta.json +0 -11
  106. package/lib/schema/schema/misc/open_graph.json +0 -78
  107. package/lib/schema/schema/misc/poly_links.json +0 -35
  108. package/lib/schema/schema/misc/structured_data.json +0 -47
  109. package/lib/schema/schema/plugin/baidu_analytics.json +0 -14
  110. package/lib/schema/schema/plugin/bing_webmaster.json +0 -14
  111. package/lib/schema/schema/plugin/busuanzi.json +0 -7
  112. package/lib/schema/schema/plugin/cnzz.json +0 -19
  113. package/lib/schema/schema/plugin/cookie_consent.json +0 -38
  114. package/lib/schema/schema/plugin/gallery.json +0 -7
  115. package/lib/schema/schema/plugin/google_analytics.json +0 -14
  116. package/lib/schema/schema/plugin/hotjar.json +0 -14
  117. package/lib/schema/schema/plugin/katex.json +0 -7
  118. package/lib/schema/schema/plugin/mathjax.json +0 -7
  119. package/lib/schema/schema/plugin/outdated_browser.json +0 -7
  120. package/lib/schema/schema/plugin/progressbar.json +0 -7
  121. package/lib/schema/schema/plugin/statcounter.json +0 -19
  122. package/lib/schema/schema/plugin/twitter_conversion_tracking.json +0 -14
  123. package/lib/schema/schema/search/algolia.json +0 -13
  124. package/lib/schema/schema/search/baidu.json +0 -13
  125. package/lib/schema/schema/search/google_cse.json +0 -17
  126. package/lib/schema/schema/search/insight.json +0 -19
  127. package/lib/schema/schema/share/addthis.json +0 -17
  128. package/lib/schema/schema/share/addtoany.json +0 -13
  129. package/lib/schema/schema/share/bdshare.json +0 -13
  130. package/lib/schema/schema/share/sharejs.json +0 -13
  131. package/lib/schema/schema/share/sharethis.json +0 -17
  132. package/lib/schema/schema/widget/adsense.json +0 -21
  133. package/lib/schema/schema/widget/archives.json +0 -13
  134. package/lib/schema/schema/widget/categories.json +0 -13
  135. package/lib/schema/schema/widget/followit.json +0 -26
  136. package/lib/schema/schema/widget/links.json +0 -47
  137. package/lib/schema/schema/widget/recent_posts.json +0 -13
  138. package/lib/schema/schema/widget/subscribe_email.json +0 -22
  139. package/lib/schema/schema/widget/tags.json +0 -30
  140. package/lib/schema/schema/widget/toc.json +0 -31
  141. package/lib/util/cache.test.js +0 -24
  142. package/lib/util/classname.test.js +0 -13
  143. package/lib/util/yaml.test.js +0 -18
  144. package/lib/view/widget/toc.test.js +0 -30
@@ -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
- }
@@ -1,105 +0,0 @@
1
- {
2
- "$schema": "http://json-schema.org/draft-07/schema#",
3
- "$id": "/comment/valine.json",
4
- "description": "Valine comment plugin configurations",
5
- "type": "object",
6
- "properties": {
7
- "type": {
8
- "type": "string",
9
- "const": "valine"
10
- },
11
- "app_id": {
12
- "type": "string",
13
- "description": "Application <APP_ID> from Leancloud"
14
- },
15
- "app_key": {
16
- "type": "string",
17
- "description": "Application <APP_KEY> from Leancloud"
18
- },
19
- "placeholder": {
20
- "type": "string",
21
- "description": "Comment box placeholders",
22
- "nullable": true
23
- },
24
- "avatar": {
25
- "type": "string",
26
- "description": "Gravatar type",
27
- "enum": ["", "mp", "identicon", "monsterid", "wavatar", "robohash", "retro", "hide", "mm"],
28
- "default": "mm",
29
- "nullable": true
30
- },
31
- "avatar_force": {
32
- "type": "boolean",
33
- "description": "Pull the latest avatar upon page visit",
34
- "default": false,
35
- "nullable": true
36
- },
37
- "meta": {
38
- "type": "array",
39
- "description": "Reviewer attributes",
40
- "items": {
41
- "type": "string"
42
- },
43
- "default": ["nick", "mail", "link"],
44
- "nullable": true
45
- },
46
- "page_size": {
47
- "type": "integer",
48
- "description": "Number of comments per page",
49
- "default": 10,
50
- "nullable": true
51
- },
52
- "lang": {
53
- "type": "string",
54
- "description": "i18n support",
55
- "default": "zh-CN",
56
- "nullable": true
57
- },
58
- "visitor": {
59
- "type": "boolean",
60
- "description": "Show visitor count",
61
- "default": false,
62
- "nullable": true
63
- },
64
- "highlight": {
65
- "type": "boolean",
66
- "description": "Enable code highlighting",
67
- "default": true,
68
- "nullable": true
69
- },
70
- "record_ip": {
71
- "type": "boolean",
72
- "description": "Record reviewer IP address",
73
- "default": false,
74
- "nullable": true
75
- },
76
- "server_urls": {
77
- "type": "string",
78
- "description": "Root URL of your custom domain",
79
- "nullable": true
80
- },
81
- "emoji_cdn": {
82
- "type": "string",
83
- "description": "CDN URL of the Emoji provider",
84
- "nullable": true
85
- },
86
- "emoji_maps": {
87
- "type": "object",
88
- "description": "Mappings between emoji and its CDN file name",
89
- "nullable": true
90
- },
91
- "enable_qq": {
92
- "type": "boolean",
93
- "description": "Enable QQ nickname and avatar",
94
- "default": false,
95
- "nullable": true
96
- },
97
- "required_fields": {
98
- "type": "array",
99
- "description": "Required commenter information fields",
100
- "default": [],
101
- "nullable": true
102
- }
103
- },
104
- "required": ["type", "app_id", "app_key"]
105
- }