hexo-next-mastodon-comments-core 1.0.6 → 1.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 +1 -1
- package/hexo-next-mastodon-comments.njk +1 -1
- package/index.js +0 -8
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -22,7 +22,7 @@ mastodon-comments:
|
|
|
22
22
|
enable: false
|
|
23
23
|
MASTODON_DOMAIN: mastodon.social # Mastodon 实例域名
|
|
24
24
|
MASTODON_USER: feiju # Mastodon 实例中根评论发布的用户名
|
|
25
|
-
# JS: https://cdn.jsdelivr.net/gh/feiju12138/mastodon-comments@
|
|
25
|
+
# JS: https://cdn.jsdelivr.net/gh/feiju12138/mastodon-comments@3/dist/mastodon-comments.min.js # 自定义 JS 文件地址
|
|
26
26
|
```
|
|
27
27
|
|
|
28
28
|
## Add `toot-id` in post header
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
if (!CONFIG.page.comments) return;
|
|
6
6
|
|
|
7
7
|
NexT.utils.loadComments("#mastodon-comments")
|
|
8
|
-
.then(() => NexT.utils.getScript(CONFIG["mastodon-comments"].JS || "https://cdn.jsdelivr.net/gh/feiju12138/mastodon-comments@
|
|
8
|
+
.then(() => NexT.utils.getScript(CONFIG["mastodon-comments"].JS || "https://cdn.jsdelivr.net/gh/feiju12138/mastodon-comments@3/dist/mastodon-comments.min.js"))
|
|
9
9
|
.then(() => {
|
|
10
10
|
const tootIdEl = document.getElementById("toot-id");
|
|
11
11
|
if (tootIdEl && tootIdEl.textContent !== "undefined") {
|
package/index.js
CHANGED
|
@@ -19,14 +19,6 @@ hexo.extend.filter.register("after_post_render", function (data) {
|
|
|
19
19
|
return data;
|
|
20
20
|
});
|
|
21
21
|
|
|
22
|
-
// 注入外部依赖
|
|
23
|
-
const css = hexo.extend.helper.get("css").bind(hexo);
|
|
24
|
-
hexo.extend.injector.register(
|
|
25
|
-
"head_end",
|
|
26
|
-
() => css("https://cdn.jsdelivr.net/npm/font-awesome@4.7.0/css/font-awesome.min.css"),
|
|
27
|
-
"post",
|
|
28
|
-
);
|
|
29
|
-
|
|
30
22
|
// 添加评论
|
|
31
23
|
const Util = require("@next-theme/utils");
|
|
32
24
|
hexo.extend.filter.register("theme_inject", injects => {
|