hexo-component-inferno 1.0.1 → 1.2.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.
- package/lib/hexo/generator/insight.js +8 -1
- package/lib/hexo/generator/insight.test.js +16 -0
- package/lib/hexo/helper/cdn.js +1 -2
- package/lib/hexo/helper/cdn.test.js +9 -9
- package/lib/hexo/tag/message.js +100 -0
- package/lib/hexo/tag/message.test.js +70 -0
- package/lib/hexo/tag/tabs.js +290 -0
- package/lib/hexo/tag/tabs.test.js +97 -0
- package/lib/schema/comment/disqusjs.json +4 -5
- package/lib/schema/comment/twikoo.json +17 -0
- package/lib/schema/comment/waline.json +28 -36
- package/lib/schema/schema/comment/changyan.json +21 -0
- package/lib/schema/schema/comment/disqus.json +17 -0
- package/lib/schema/schema/comment/disqusjs.json +53 -0
- package/lib/schema/schema/comment/facebook.json +13 -0
- package/lib/schema/schema/comment/gitalk.json +81 -0
- package/lib/schema/schema/comment/gitment.json +47 -0
- package/lib/schema/schema/comment/isso.json +17 -0
- package/lib/schema/schema/comment/livere.json +17 -0
- package/lib/schema/schema/comment/twikoo.json +17 -0
- package/lib/schema/schema/comment/utterances.json +59 -0
- package/lib/schema/schema/comment/valine.json +105 -0
- package/lib/schema/schema/comment/waline.json +164 -0
- package/lib/schema/schema/donate/afdian.json +17 -0
- package/lib/schema/schema/donate/alipay.json +17 -0
- package/lib/schema/schema/donate/buymeacoffee.json +17 -0
- package/lib/schema/schema/donate/patreon.json +17 -0
- package/lib/schema/schema/donate/paypal.json +22 -0
- package/lib/schema/schema/donate/wechat.json +17 -0
- package/lib/schema/schema/misc/manifest.json +66 -0
- package/lib/schema/schema/misc/meta.json +11 -0
- package/lib/schema/schema/misc/open_graph.json +78 -0
- package/lib/schema/schema/misc/poly_links.json +35 -0
- package/lib/schema/schema/misc/structured_data.json +47 -0
- package/lib/schema/schema/plugin/baidu_analytics.json +14 -0
- package/lib/schema/schema/plugin/bing_webmaster.json +14 -0
- package/lib/schema/schema/plugin/busuanzi.json +7 -0
- package/lib/schema/schema/plugin/cnzz.json +19 -0
- package/lib/schema/schema/plugin/cookie_consent.json +38 -0
- package/lib/schema/schema/plugin/gallery.json +7 -0
- package/lib/schema/schema/plugin/google_analytics.json +14 -0
- package/lib/schema/schema/plugin/hotjar.json +14 -0
- package/lib/schema/schema/plugin/katex.json +7 -0
- package/lib/schema/schema/plugin/mathjax.json +7 -0
- package/lib/schema/schema/plugin/outdated_browser.json +7 -0
- package/lib/schema/schema/plugin/progressbar.json +7 -0
- package/lib/schema/schema/plugin/statcounter.json +19 -0
- package/lib/schema/schema/plugin/twitter_conversion_tracking.json +14 -0
- package/lib/schema/schema/search/algolia.json +13 -0
- package/lib/schema/schema/search/baidu.json +13 -0
- package/lib/schema/schema/search/google_cse.json +17 -0
- package/lib/schema/schema/search/insight.json +13 -0
- package/lib/schema/schema/share/addthis.json +17 -0
- package/lib/schema/schema/share/addtoany.json +13 -0
- package/lib/schema/schema/share/bdshare.json +13 -0
- package/lib/schema/schema/share/sharejs.json +13 -0
- package/lib/schema/schema/share/sharethis.json +17 -0
- package/lib/schema/schema/widget/adsense.json +21 -0
- package/lib/schema/schema/widget/archives.json +13 -0
- package/lib/schema/schema/widget/categories.json +13 -0
- package/lib/schema/schema/widget/followit.json +26 -0
- package/lib/schema/schema/widget/links.json +47 -0
- package/lib/schema/schema/widget/recent_posts.json +13 -0
- package/lib/schema/schema/widget/subscribe_email.json +22 -0
- package/lib/schema/schema/widget/tags.json +30 -0
- package/lib/schema/schema/widget/toc.json +31 -0
- package/lib/schema/widget/tags.json +17 -0
- package/lib/view/comment/changyan.js +2 -2
- package/lib/view/comment/disqus.js +2 -2
- package/lib/view/comment/disqusjs.js +2 -2
- package/lib/view/comment/facebook.js +2 -2
- package/lib/view/comment/gitalk.js +2 -2
- package/lib/view/comment/gitment.js +2 -2
- package/lib/view/comment/isso.js +2 -2
- package/lib/view/comment/livere.js +2 -2
- package/lib/view/comment/twikoo.js +102 -0
- package/lib/view/comment/utterances.js +2 -2
- package/lib/view/comment/valine.js +2 -2
- package/lib/view/comment/waline.js +31 -36
- package/lib/view/common/article_media.js +2 -2
- package/lib/view/donate/afdian.js +2 -2
- package/lib/view/donate/alipay.js +2 -2
- package/lib/view/donate/buymeacoffee.js +2 -2
- package/lib/view/donate/patreon.js +2 -2
- package/lib/view/donate/paypal.js +2 -2
- package/lib/view/donate/wechat.js +2 -2
- package/lib/view/misc/article_licensing.js +2 -2
- package/lib/view/misc/meta.js +2 -2
- package/lib/view/misc/open_graph.js +12 -4
- package/lib/view/misc/paginator.js +2 -2
- package/lib/view/misc/structured_data.js +2 -2
- package/lib/view/misc/web_app.js +2 -2
- package/lib/view/plugin/baidu_analytics.js +2 -2
- package/lib/view/plugin/bing_webmaster.js +2 -2
- package/lib/view/plugin/busuanzi.js +2 -2
- package/lib/view/plugin/cnzz.js +2 -2
- package/lib/view/plugin/cookie_consent.js +2 -2
- package/lib/view/plugin/gallery.js +2 -2
- package/lib/view/plugin/google_analytics.js +2 -2
- package/lib/view/plugin/hotjar.js +2 -2
- package/lib/view/plugin/katex.js +2 -2
- package/lib/view/plugin/mathjax.js +2 -2
- package/lib/view/plugin/outdated_browser.js +2 -2
- package/lib/view/plugin/progressbar.js +2 -2
- package/lib/view/plugin/statcounter.js +2 -2
- package/lib/view/plugin/twitter_conversion_tracking.js +2 -2
- package/lib/view/search/algolia.js +2 -2
- package/lib/view/search/baidu.js +2 -2
- package/lib/view/search/google_cse.js +2 -2
- package/lib/view/search/insight.js +2 -2
- package/lib/view/share/addthis.js +2 -2
- package/lib/view/share/addtoany.js +2 -2
- package/lib/view/share/bdshare.js +2 -2
- package/lib/view/share/sharejs.js +2 -2
- package/lib/view/share/sharethis.js +2 -2
- package/lib/view/widget/adsense.js +2 -2
- package/lib/view/widget/archives.js +2 -2
- package/lib/view/widget/categories.js +2 -2
- package/lib/view/widget/followit.js +2 -2
- package/lib/view/widget/links.js +2 -2
- package/lib/view/widget/recent_posts.js +2 -2
- package/lib/view/widget/subscribe_email.js +2 -2
- package/lib/view/widget/tags.js +16 -15
- package/lib/view/widget/toc.js +2 -2
- package/package.json +9 -11
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
const {
|
|
2
|
+
join
|
|
3
|
+
} = require('path');
|
|
4
|
+
|
|
5
|
+
const Hexo = require('hexo');
|
|
6
|
+
|
|
7
|
+
const cheerio = require('cheerio');
|
|
8
|
+
|
|
9
|
+
const register = require('./tabs');
|
|
10
|
+
|
|
11
|
+
const rootDir = join(__dirname, '../../../fixture/site');
|
|
12
|
+
const hexo = new Hexo(rootDir, {
|
|
13
|
+
silent: true
|
|
14
|
+
});
|
|
15
|
+
const cheerioOptions = {
|
|
16
|
+
xml: {
|
|
17
|
+
normalizeWhitespace: true
|
|
18
|
+
}
|
|
19
|
+
};
|
|
20
|
+
beforeAll(async () => {
|
|
21
|
+
await hexo.init();
|
|
22
|
+
await hexo.load();
|
|
23
|
+
register(hexo);
|
|
24
|
+
await hexo.loadPlugin(require.resolve('hexo-renderer-marked'));
|
|
25
|
+
});
|
|
26
|
+
test('create default tabs', async () => {
|
|
27
|
+
const render = hexo.extend.tag.render.bind(hexo.extend.tag);
|
|
28
|
+
let source = '{% tabs %}<!--tab id:tab1-->**content**<!--endtab-->{% endtabs %}';
|
|
29
|
+
let actual = cheerio.load(await render(source), cheerioOptions, false).html();
|
|
30
|
+
expect(actual).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>');
|
|
31
|
+
source = `{% tabs %}
|
|
32
|
+
<!-- tab --># title 1<!-- endtab -->
|
|
33
|
+
<!-- tab --># title 2<!-- endtab -->
|
|
34
|
+
{% endtabs %}`;
|
|
35
|
+
const $ = cheerio.load(await render(source), cheerioOptions, false);
|
|
36
|
+
const [tabId1, tabId2] = $('.tab-content').get().map(element => $(element).attr('id'));
|
|
37
|
+
actual = $.html();
|
|
38
|
+
expect(actual).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>');
|
|
39
|
+
});
|
|
40
|
+
test('create tabs with different alignment', async () => {
|
|
41
|
+
const render = hexo.extend.tag.render.bind(hexo.extend.tag);
|
|
42
|
+
|
|
43
|
+
for (const align of ['left', 'centered', 'right', 'fullwidth']) {
|
|
44
|
+
const source = `{% tabs align:${align} %}<!--tab id:tab1-->content<!--endtab-->{% endtabs %}`;
|
|
45
|
+
const actual = cheerio.load(await render(source), cheerioOptions, false).html();
|
|
46
|
+
expect(actual).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>');
|
|
47
|
+
}
|
|
48
|
+
});
|
|
49
|
+
test('create tabs with different sizes', async () => {
|
|
50
|
+
const render = hexo.extend.tag.render.bind(hexo.extend.tag);
|
|
51
|
+
|
|
52
|
+
for (const size of ['small', 'medium', 'large']) {
|
|
53
|
+
const source = `{% tabs size:${size} %}<!--tab id:tab1-->content<!--endtab-->{% endtabs %}`;
|
|
54
|
+
const actual = cheerio.load(await render(source), cheerioOptions, false).html();
|
|
55
|
+
expect(actual).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>');
|
|
56
|
+
}
|
|
57
|
+
});
|
|
58
|
+
test('create tabs with different styles', async () => {
|
|
59
|
+
const render = hexo.extend.tag.render.bind(hexo.extend.tag);
|
|
60
|
+
|
|
61
|
+
for (const style of ['boxed', 'toggle', 'toggle-rounded']) {
|
|
62
|
+
const source = `{% tabs style:${style} %}<!--tab id:tab1-->content<!--endtab-->{% endtabs %}`;
|
|
63
|
+
const actual = cheerio.load(await render(source), cheerioOptions, false).html();
|
|
64
|
+
const classname = style === 'toggle-rounded' ? 'toggle is-toggle-rounded' : style;
|
|
65
|
+
expect(actual).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>');
|
|
66
|
+
}
|
|
67
|
+
});
|
|
68
|
+
test('create tabs with active status', async () => {
|
|
69
|
+
const render = hexo.extend.tag.render.bind(hexo.extend.tag);
|
|
70
|
+
const source = `{% tabs %}
|
|
71
|
+
<!-- tab id:tab1 -->tab 1<!-- endtab -->
|
|
72
|
+
<!-- tab id:tab2 active -->tab 2<!-- endtab -->
|
|
73
|
+
{% endtabs %}`;
|
|
74
|
+
const actual = cheerio.load(await render(source), cheerioOptions, false).html();
|
|
75
|
+
expect(actual).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>');
|
|
76
|
+
});
|
|
77
|
+
test('create tabs with a title', async () => {
|
|
78
|
+
const render = hexo.extend.tag.render.bind(hexo.extend.tag);
|
|
79
|
+
const source = '{% tabs %}<!--tab id:tab1 "title:Tab Title"-->tab<!--endtab-->{% endtabs %}';
|
|
80
|
+
const actual = cheerio.load(await render(source), cheerioOptions, false).html();
|
|
81
|
+
expect(actual).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>');
|
|
82
|
+
});
|
|
83
|
+
test('create tabs with an icon', async () => {
|
|
84
|
+
const render = hexo.extend.tag.render.bind(hexo.extend.tag);
|
|
85
|
+
const source = '{% tabs %}<!--tab id:tab1 "icon:fab fa-github"-->tab<!--endtab-->{% endtabs %}';
|
|
86
|
+
const actual = cheerio.load(await render(source), cheerioOptions, false).html();
|
|
87
|
+
expect(actual).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>');
|
|
88
|
+
});
|
|
89
|
+
test('create tabs with all properties', async () => {
|
|
90
|
+
const render = hexo.extend.tag.render.bind(hexo.extend.tag);
|
|
91
|
+
const source = `{% tabs align:fullwidth 'size:large' style:boxed %}
|
|
92
|
+
<!-- tab id:tab1 "icon:fas\\ fa-file" -->tab 1<!-- endtab -->
|
|
93
|
+
<!-- tab id:tab2 active 'title:Tim\\'s Tab' -->tab 2<!-- endtab -->
|
|
94
|
+
{% endtabs %}`;
|
|
95
|
+
const actual = cheerio.load(await render(source), cheerioOptions, false).html();
|
|
96
|
+
expect(actual).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'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>');
|
|
97
|
+
});
|
|
@@ -0,0 +1,17 @@
|
|
|
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"
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
"required": ["type", "env_id"]
|
|
17
|
+
}
|
|
@@ -12,6 +12,10 @@
|
|
|
12
12
|
"type": "string",
|
|
13
13
|
"description": "Waline server address url."
|
|
14
14
|
},
|
|
15
|
+
"path": {
|
|
16
|
+
"type": "string",
|
|
17
|
+
"description": "Article path id. Used to distinguish different article pages to ensure loading the correct comment list under the article page."
|
|
18
|
+
},
|
|
15
19
|
"lang": {
|
|
16
20
|
"type": "string",
|
|
17
21
|
"description": "Display language.",
|
|
@@ -34,31 +38,31 @@
|
|
|
34
38
|
},
|
|
35
39
|
{
|
|
36
40
|
"type": "object",
|
|
37
|
-
"description": "Emoji set configuration",
|
|
41
|
+
"description": "Emoji set configuration.",
|
|
38
42
|
"properties": {
|
|
39
43
|
"name": {
|
|
40
44
|
"type": "string",
|
|
41
|
-
"description": "Emoji name on the tab"
|
|
45
|
+
"description": "Emoji name on the tab."
|
|
42
46
|
},
|
|
43
47
|
"folder": {
|
|
44
48
|
"type": "string",
|
|
45
|
-
"description": "Image folder link"
|
|
49
|
+
"description": "Image folder link."
|
|
46
50
|
},
|
|
47
51
|
"prefix": {
|
|
48
52
|
"type": "string",
|
|
49
|
-
"description": "The general prefix of images' filename"
|
|
53
|
+
"description": "The general prefix of images' filename."
|
|
50
54
|
},
|
|
51
55
|
"type": {
|
|
52
56
|
"type": "string",
|
|
53
|
-
"description": "Type of the picture, which will be used as file extension"
|
|
57
|
+
"description": "Type of the picture, which will be used as file extension."
|
|
54
58
|
},
|
|
55
59
|
"icon": {
|
|
56
60
|
"type": "string",
|
|
57
|
-
"description": "Filename of the icon image used in tab (requirement is the same as items)"
|
|
61
|
+
"description": "Filename of the icon image used in tab (requirement is the same as items)."
|
|
58
62
|
},
|
|
59
63
|
"items": {
|
|
60
64
|
"type": "array",
|
|
61
|
-
"description": "Each item is the picture filename without common prefix (do not include file extension)",
|
|
65
|
+
"description": "Each item is the picture filename without common prefix (do not include file extension).",
|
|
62
66
|
"items": {
|
|
63
67
|
"type": "string"
|
|
64
68
|
}
|
|
@@ -68,18 +72,18 @@
|
|
|
68
72
|
}
|
|
69
73
|
]
|
|
70
74
|
},
|
|
71
|
-
"description": "Emoji settings",
|
|
75
|
+
"description": "Emoji settings.",
|
|
72
76
|
"default": ["https://cdn.jsdelivr.net/gh/walinejs/emojis/weibo"],
|
|
73
77
|
"nullable": true
|
|
74
78
|
},
|
|
75
79
|
"dark": {
|
|
76
80
|
"type": "string",
|
|
77
|
-
"description": "Darkmode support",
|
|
81
|
+
"description": "Darkmode support.",
|
|
78
82
|
"nullable": true
|
|
79
83
|
},
|
|
80
84
|
"meta": {
|
|
81
85
|
"type": "array",
|
|
82
|
-
"description": "Reviewer attributes",
|
|
86
|
+
"description": "Reviewer attributes.",
|
|
83
87
|
"items": {
|
|
84
88
|
"type": "string"
|
|
85
89
|
},
|
|
@@ -88,43 +92,37 @@
|
|
|
88
92
|
},
|
|
89
93
|
"required_meta": {
|
|
90
94
|
"type": "array",
|
|
91
|
-
"description": "Required commenter information fields",
|
|
95
|
+
"description": "Required commenter information fields.",
|
|
92
96
|
"default": [],
|
|
93
97
|
"nullable": true
|
|
94
98
|
},
|
|
95
99
|
"login": {
|
|
96
100
|
"type": "string",
|
|
97
|
-
"description": "Login mode status",
|
|
101
|
+
"description": "Login mode status.",
|
|
98
102
|
"enum": ["enable", "disable", "force"],
|
|
99
103
|
"default": "enable",
|
|
100
104
|
"nullable": true
|
|
101
105
|
},
|
|
102
|
-
"avatar": {
|
|
103
|
-
"type": "string",
|
|
104
|
-
"description": "Gravatar type",
|
|
105
|
-
"enum": ["", "mp", "identicon", "monsterid", "wavatar", "robohash", "retro", "hide", "mm"],
|
|
106
|
-
"default": "mp",
|
|
107
|
-
"nullable": true
|
|
108
|
-
},
|
|
109
106
|
"word_limit": {
|
|
110
107
|
"oneOf": [
|
|
111
108
|
{
|
|
112
109
|
"type": "number",
|
|
113
|
-
"minimum": 0
|
|
110
|
+
"minimum": 0,
|
|
111
|
+
"nullable": true
|
|
114
112
|
},
|
|
115
113
|
{
|
|
116
114
|
"type": "array",
|
|
117
115
|
"minItems": 2,
|
|
118
116
|
"maxItems": 2,
|
|
119
|
-
"minimum": 0,
|
|
120
117
|
"items": {
|
|
121
|
-
"type": "number"
|
|
122
|
-
|
|
118
|
+
"type": "number",
|
|
119
|
+
"minimum": 0
|
|
120
|
+
},
|
|
121
|
+
"nullable": true
|
|
123
122
|
}
|
|
124
123
|
],
|
|
125
124
|
"description": "Comment word s limit. When a single number is filled in, it 's the maximum number of comment words. No limit when set to 0.",
|
|
126
|
-
"default": 0
|
|
127
|
-
"nullable": true
|
|
125
|
+
"default": 0
|
|
128
126
|
},
|
|
129
127
|
"page_size": {
|
|
130
128
|
"type": "number",
|
|
@@ -132,16 +130,10 @@
|
|
|
132
130
|
"default": 10,
|
|
133
131
|
"nullable": true
|
|
134
132
|
},
|
|
135
|
-
"
|
|
136
|
-
"type": "string",
|
|
137
|
-
"description": "Gravatar CDN baseURL.",
|
|
138
|
-
"default": "https://sdn.geekzu.org/avatar/",
|
|
139
|
-
"nullable": true
|
|
140
|
-
},
|
|
141
|
-
"avatar_force": {
|
|
133
|
+
"upload_image": {
|
|
142
134
|
"type": "boolean",
|
|
143
|
-
"description": "
|
|
144
|
-
"default":
|
|
135
|
+
"description": "If you set it to false, image upload feature will be disabled.",
|
|
136
|
+
"default": true,
|
|
145
137
|
"nullable": true
|
|
146
138
|
},
|
|
147
139
|
"highlight": {
|
|
@@ -150,9 +142,9 @@
|
|
|
150
142
|
"default": true,
|
|
151
143
|
"nullable": true
|
|
152
144
|
},
|
|
153
|
-
"
|
|
145
|
+
"math": {
|
|
154
146
|
"type": "boolean",
|
|
155
|
-
"description": "
|
|
147
|
+
"description": "If you set it to 'false', math preview feature will be disabled.",
|
|
156
148
|
"default": false,
|
|
157
149
|
"nullable": true
|
|
158
150
|
},
|
|
@@ -0,0 +1,21 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,81 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
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"
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
"required": ["type", "env_id"]
|
|
17
|
+
}
|
|
@@ -0,0 +1,59 @@
|
|
|
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
|
+
}
|