hexo-component-inferno 5.0.0 → 5.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.
package/README.md
CHANGED
|
@@ -121,7 +121,7 @@ For example, `{ "$ref": "/comment/giscus.json" }` in your schema refers to the G
|
|
|
121
121
|
|
|
122
122
|
| Category | Components |
|
|
123
123
|
| --------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
124
|
-
| `comment` | Artalk, Beaudar, Changyan, Cusdis, Disqus, DisqusJS, Facebook, Giscus, Gitalk 2 (preview), Gitment (deprecated), Isso, LiveRe, Twikoo, Utterances, Valine (deprecated), Waline
|
|
124
|
+
| `comment` | Artalk, Beaudar, Changyan, Cusdis (deprecated), Disqus, DisqusJS, Facebook, Giscus, Gitalk 2 (preview), Gitment (deprecated), Isso, LiveRe, Twikoo, Utterances, Valine (deprecated), Waline |
|
|
125
125
|
| `search` | Algolia, Baidu, Google CSE, Insight |
|
|
126
126
|
| `share` | AddThis (deprecated), AddToAny, Baidu Share (deprecated), Web Share, ShareThis |
|
|
127
127
|
| `donate` | Afdian, Alipay, Buy Me a Coffee, Patreon, PayPal, WeChat |
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
3
|
"$id": "/comment/cusdis.json",
|
|
4
|
-
"description": "Cusdis comment plugin configurations\nhttps://cusdis.com/doc",
|
|
4
|
+
"description": "Cusdis comment plugin configurations\nDEPRECATED: Cusdis was archived on July 17, 2026. Use another comment system instead.\nhttps://cusdis.com/doc",
|
|
5
5
|
"type": "object",
|
|
6
6
|
"properties": {
|
|
7
7
|
"type": {
|
|
@@ -1,17 +1,23 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
3
|
"$id": "/comment/livere.json",
|
|
4
|
-
"description": "Livere comment plugin configurations",
|
|
4
|
+
"description": "Livere comment plugin configurations\nhttps://admin.livere.org/",
|
|
5
5
|
"type": "object",
|
|
6
6
|
"properties": {
|
|
7
7
|
"type": {
|
|
8
8
|
"type": "string",
|
|
9
9
|
"const": "livere"
|
|
10
10
|
},
|
|
11
|
+
"client_id": {
|
|
12
|
+
"type": "string",
|
|
13
|
+
"description": "Client ID in the installation code of LiveRe (the client-id attribute of <livere-comment>)"
|
|
14
|
+
},
|
|
11
15
|
"uid": {
|
|
12
16
|
"type": "string",
|
|
13
|
-
"description": "LiveRe
|
|
17
|
+
"description": "UID of the legacy LiveRe City installation code (the data-uid attribute). Ignored if client_id is set",
|
|
18
|
+
"nullable": true
|
|
14
19
|
}
|
|
15
20
|
},
|
|
16
|
-
"required": ["type",
|
|
21
|
+
"required": ["type"],
|
|
22
|
+
"anyOf": [{ "required": ["client_id"] }, { "required": ["uid"] }]
|
|
17
23
|
}
|
|
@@ -26,10 +26,13 @@ var loadScripts = require('../../util/script');
|
|
|
26
26
|
var toJs = loadScripts.toJs;
|
|
27
27
|
var _require3 = require('../../util/appearance'),
|
|
28
28
|
getAppearance = _require3.getAppearance;
|
|
29
|
+
var _require4 = require('../../util/deprecate'),
|
|
30
|
+
deprecate = _require4.deprecate;
|
|
29
31
|
|
|
30
32
|
/**
|
|
31
33
|
* Cusdis comment JSX component.
|
|
32
34
|
*
|
|
35
|
+
* @deprecated Cusdis was archived on July 17, 2026. Use another comment system instead.
|
|
33
36
|
* @see https://cusdis.com/doc
|
|
34
37
|
* @example
|
|
35
38
|
* <Cusdis
|
|
@@ -50,6 +53,7 @@ var Cusdis = /*#__PURE__*/function (_Component) {
|
|
|
50
53
|
return _createClass(Cusdis, [{
|
|
51
54
|
key: "render",
|
|
52
55
|
value: function render() {
|
|
56
|
+
deprecate('comment.cusdis', 'Archived on 2026-07-17. Use another comment system.');
|
|
53
57
|
var _this$props = this.props,
|
|
54
58
|
_this$props$host = _this$props.host,
|
|
55
59
|
host = _this$props$host === void 0 ? 'https://cusdis.com' : _this$props$host,
|
|
@@ -22,12 +22,17 @@ var _require = require('inferno'),
|
|
|
22
22
|
Component = _require.Component;
|
|
23
23
|
var _require2 = require('../../util/cache'),
|
|
24
24
|
cacheComponent = _require2.cacheComponent;
|
|
25
|
+
var loadScripts = require('../../util/script');
|
|
25
26
|
|
|
26
27
|
/**
|
|
27
28
|
* LiveRe comment JSX component.
|
|
29
|
+
* <p>
|
|
30
|
+
* Renders the current LiveRe widget when <code>clientId</code> is set, and the legacy LiveRe City
|
|
31
|
+
* widget when only <code>uid</code> is set.
|
|
28
32
|
*
|
|
29
|
-
* @see https://livere.
|
|
33
|
+
* @see https://admin.livere.org/
|
|
30
34
|
* @example
|
|
35
|
+
* <LiveRe clientId="******" />
|
|
31
36
|
* <LiveRe uid="******" />
|
|
32
37
|
*/
|
|
33
38
|
var LiveRe = /*#__PURE__*/function (_Component) {
|
|
@@ -39,9 +44,24 @@ var LiveRe = /*#__PURE__*/function (_Component) {
|
|
|
39
44
|
return _createClass(LiveRe, [{
|
|
40
45
|
key: "render",
|
|
41
46
|
value: function render() {
|
|
42
|
-
var
|
|
47
|
+
var _this$props = this.props,
|
|
48
|
+
clientId = _this$props.clientId,
|
|
49
|
+
uid = _this$props.uid;
|
|
50
|
+
if (clientId) {
|
|
51
|
+
// <livere-comment> is a custom element, so the widget also starts on pages that PJAX inserts
|
|
52
|
+
// after the script is loaded
|
|
53
|
+
return (0, _inferno.createFragment)([(0, _inferno.createVNode)(1, "livere-comment", null, null, 1, {
|
|
54
|
+
"client-id": clientId
|
|
55
|
+
}), (0, _inferno.createVNode)(1, "script", null, null, 1, {
|
|
56
|
+
"dangerouslySetInnerHTML": {
|
|
57
|
+
__html: loadScripts('https://www.livere.org/livere-widget.js', '', {
|
|
58
|
+
type: 'module'
|
|
59
|
+
})
|
|
60
|
+
}
|
|
61
|
+
})], 4);
|
|
62
|
+
}
|
|
43
63
|
if (!uid) {
|
|
44
|
-
return (0, _inferno.createVNode)(1, "div", "notification is-danger", [(0, _inferno.createTextVNode)("You forgot to set the "), (0, _inferno.createVNode)(1, "code", null, "
|
|
64
|
+
return (0, _inferno.createVNode)(1, "div", "notification is-danger", [(0, _inferno.createTextVNode)("You forgot to set the "), (0, _inferno.createVNode)(1, "code", null, "client_id", 16), (0, _inferno.createTextVNode)(" for LiveRe. Please set it in"), (0, _inferno.createTextVNode)(' '), (0, _inferno.createVNode)(1, "code", null, "_config.yml", 16), (0, _inferno.createTextVNode)(".")], 0);
|
|
45
65
|
}
|
|
46
66
|
var js = "(function(d, s) {\n var j, e = d.getElementsByTagName(s)[0];\n\n if (typeof LivereTower === 'function') { return; }\n\n j = d.createElement(s);\n j.src = 'https://cdn-city.livere.com/js/embed.dist.js';\n j.async = true;\n\n e.parentNode.insertBefore(j, e);\n })(document, 'script');";
|
|
47
67
|
return (0, _inferno.createVNode)(1, "div", null, [(0, _inferno.createVNode)(1, "script", null, null, 1, {
|
|
@@ -64,11 +84,12 @@ var LiveRe = /*#__PURE__*/function (_Component) {
|
|
|
64
84
|
*
|
|
65
85
|
* @see module:util/cache.cacheComponent
|
|
66
86
|
* @example
|
|
67
|
-
* <LiveRe.Cacheable comment={{
|
|
87
|
+
* <LiveRe.Cacheable comment={{ client_id: '******' }} />
|
|
68
88
|
*/
|
|
69
89
|
LiveRe.Cacheable = cacheComponent(LiveRe, 'comment.livere', function (props) {
|
|
70
90
|
var comment = props.comment;
|
|
71
91
|
return {
|
|
92
|
+
clientId: comment.client_id,
|
|
72
93
|
uid: comment.uid
|
|
73
94
|
};
|
|
74
95
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "hexo-component-inferno",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.1.0",
|
|
4
4
|
"description": "A collection of Inferno.js layout components and utility scripts for Hexo",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"repository": "https://github.com/ppoffice/hexo-component-inferno",
|