diff --git a/README.md b/README.md
index 1c9d1e3..4276e2d 100644
--- a/README.md
+++ b/README.md
@@ -188,7 +188,7 @@ rss:
# 评论插件
# 主题内置了 Valine 和 Gitalk,只能使用其中一款。
# ---------------------------------------------------------------------------------------
-comments:
+comment:
# Valine
# See: https://github.com/xCss/Valine
# 如何使用 Valine,请参考官方教程:https://github.com/xCss/Valine
@@ -430,7 +430,7 @@ top: 9999
hexo new page about
```
2. 创建成功后,打开博客目录下 `/source/about/index.md` 文件,即可填写自己的内容。
- 支持 Markdown 和 HTML 格式;`comments: true` 表示该页面开启评论功能。
+ 支持 Markdown 和 HTML 格式;`comment: true` 表示该页面开启评论功能。
参考如下示例:
@@ -438,7 +438,7 @@ top: 9999
---
title: about
date: 2020-03-19 14:59:53
- comments: true
+ comment: true
---
## About me
diff --git a/_config.yml b/_config.yml
index 5789664..49660df 100644
--- a/_config.yml
+++ b/_config.yml
@@ -46,7 +46,7 @@ rss:
# ---------------------------------------------------------------------------------------
# Comment plugin
# ---------------------------------------------------------------------------------------
-comments:
+comment:
# Valine
# See: https://github.com/xCss/Valine
valine:
diff --git a/languages/en.yml b/languages/en.yml
index 49ab90f..aea7795 100644
--- a/languages/en.yml
+++ b/languages/en.yml
@@ -15,7 +15,6 @@ tag: Tag
tags: Tags
tagcloud: Tag Cloud
comment: Comment
-comments: Comments
home: Home
archive: Archive
archives: Archives
diff --git a/languages/zh-CN.yml b/languages/zh-CN.yml
index 103bbcb..276bba9 100644
--- a/languages/zh-CN.yml
+++ b/languages/zh-CN.yml
@@ -14,8 +14,7 @@ categories: 分类
tag: 标签
tags: 标签
tagcloud: 标签云
-comment: 留言
-comments: 评论
+comment: 评论
home: 首页
archive: 归档
archives: 归档
diff --git a/layout/_partial/comments/comment.ejs b/layout/_partial/comment/comment.ejs
similarity index 50%
rename from layout/_partial/comments/comment.ejs
rename to layout/_partial/comment/comment.ejs
index 3856c31..42f7773 100644
--- a/layout/_partial/comments/comment.ejs
+++ b/layout/_partial/comment/comment.ejs
@@ -1,10 +1,10 @@
diff --git a/layout/_partial/comment/gitalk.ejs b/layout/_partial/comment/gitalk.ejs
new file mode 100644
index 0000000..559ae27
--- /dev/null
+++ b/layout/_partial/comment/gitalk.ejs
@@ -0,0 +1,22 @@
+<% if(
+ theme.comment.gitalk.enable
+ && theme.comment.gitalk.client_id
+ && theme.comment.gitalk.client_secret
+ && theme.comment.gitalk.github_id
+ && theme.comment.gitalk.repository
+) { %>
+
+
+
+<% } %>
diff --git a/layout/_partial/comments/valine.ejs b/layout/_partial/comment/valine.ejs
similarity index 79%
rename from layout/_partial/comments/valine.ejs
rename to layout/_partial/comment/valine.ejs
index 9fd491e..0744b59 100755
--- a/layout/_partial/comments/valine.ejs
+++ b/layout/_partial/comment/valine.ejs
@@ -1,7 +1,7 @@
<% if(
- theme.comments.valine.enable
- && theme.comments.valine.appid
- && theme.comments.valine.appkey
+ theme.comment.valine.enable
+ && theme.comment.valine.appid
+ && theme.comment.valine.appkey
) { %>
@@ -9,12 +9,12 @@
-
-
-<% } %>
\ No newline at end of file
diff --git a/layout/_partial/scripts.ejs b/layout/_partial/scripts.ejs
index e02da4e..0c85c9c 100644
--- a/layout/_partial/scripts.ejs
+++ b/layout/_partial/scripts.ejs
@@ -22,6 +22,6 @@
<% } %>
<% if (theme.toc.enable) { %>
- <%- js(['lib/anime.min.js', 'js/toc.js']) %>
+ <%- js(['js/libs/anime.min.js', 'js/toc.js']) %>
<% } %>
<% } %>
diff --git a/layout/_partial/tools.ejs b/layout/_partial/tools.ejs
index c239a71..c714b07 100644
--- a/layout/_partial/tools.ejs
+++ b/layout/_partial/tools.ejs
@@ -6,7 +6,7 @@
<% } %>
- <% if (is_post() && (theme.comments.valine.enable || theme.comments.gitalk.enable)) { %>
+ <% if (is_post() && (theme.comment.valine.enable || theme.comment.gitalk.enable)) { %>
diff --git a/layout/about.ejs b/layout/about.ejs
index 573fbe4..bd15310 100644
--- a/layout/about.ejs
+++ b/layout/about.ejs
@@ -4,8 +4,8 @@
<%- page.content %>
diff --git a/layout/article-content.ejs b/layout/article-content.ejs
index e0d0ff5..29dcb33 100644
--- a/layout/article-content.ejs
+++ b/layout/article-content.ejs
@@ -61,9 +61,9 @@
<% } %>
- <% if (theme.comments.valine.enable || theme.comments.gitalk.enable) { %>
+ <% if (theme.comment.valine.enable || theme.comment.gitalk.enable) { %>
<% } %>
diff --git a/layout/category-list.ejs b/layout/category-list.ejs
index a9ba032..aee9205 100644
--- a/layout/category-list.ejs
+++ b/layout/category-list.ejs
@@ -6,8 +6,8 @@
}) %>
diff --git a/layout/links.ejs b/layout/links.ejs
index dd1fcad..57605e7 100644
--- a/layout/links.ejs
+++ b/layout/links.ejs
@@ -4,8 +4,8 @@
<%- page.content %>
diff --git a/source/css/layout/_partial/comment/comment.styl b/source/css/layout/_partial/comment/comment.styl
new file mode 100644
index 0000000..fc7d4da
--- /dev/null
+++ b/source/css/layout/_partial/comment/comment.styl
@@ -0,0 +1,18 @@
+if (hexo-config('comment.valine.enable')) {
+ @require "./valine.styl";
+}
+
+if (hexo-config('comment.gitalk.enable')) {
+ @require "./gitalk.styl";
+}
+
+if (hexo-config('comment.valine.enable') && hexo-config('comment.gitalk.enable')) {
+ @require "./valine.styl";
+}
+
+.comments-container {
+ #comment-anchor {
+ width: 100%;
+ height: 20px;
+ }
+}
diff --git a/source/css/layout/_partial/comments/gitalk.styl b/source/css/layout/_partial/comment/gitalk.styl
similarity index 100%
rename from source/css/layout/_partial/comments/gitalk.styl
rename to source/css/layout/_partial/comment/gitalk.styl
diff --git a/source/css/layout/_partial/comments/valine.styl b/source/css/layout/_partial/comment/valine.styl
similarity index 100%
rename from source/css/layout/_partial/comments/valine.styl
rename to source/css/layout/_partial/comment/valine.styl
diff --git a/source/css/layout/_partial/comments/comment.styl b/source/css/layout/_partial/comments/comment.styl
deleted file mode 100644
index 41e1e45..0000000
--- a/source/css/layout/_partial/comments/comment.styl
+++ /dev/null
@@ -1,14 +0,0 @@
-if (hexo-config('comments.valine.enable')) {
- @require "./valine.styl";
-}
-
-if (hexo-config('comments.gitalk.enable')) {
- @require "./gitalk.styl";
-}
-
-.comments-container {
- #comment-anchor {
- width: 100%;
- height: 20px;
- }
-}
diff --git a/source/css/style.styl b/source/css/style.styl
index 5d17b91..b1d9b2e 100644
--- a/source/css/style.styl
+++ b/source/css/style.styl
@@ -4,7 +4,7 @@
@import "layout/page.styl"
@import "layout/_partial/local-search.styl"
@import "layout/_partial/toc.styl"
-@import "layout/_partial/comments/comment.styl"
+@import "layout/_partial/comment/comment.styl"
@import "layout/_partial/header.styl"
@import "layout/_partial/tools.styl"
@import "layout/_partial/tools2.styl"
diff --git a/source/lib/anime.min.js b/source/js/libs/anime.min.js
similarity index 100%
rename from source/lib/anime.min.js
rename to source/js/libs/anime.min.js