diff --git a/_config.yml b/_config.yml index 7a65569d..d83bcaef 100644 --- a/_config.yml +++ b/_config.yml @@ -111,6 +111,14 @@ disqus_shortname: false uyan_uid: false # 是否开启网易云跟帖, 填写app sdk中的app key wangyi_ygt: false +# 关闭 +# gitment: false +# 开启 +gitment: + owner: + repo: + client_id: + client_secret: # 规范网址 # 让搜索引擎重定向你的不同域名、不同子域、同域不同目录的站点到你期望的路径 diff --git a/layout/_partial/plugins/gitment.ejs b/layout/_partial/plugins/gitment.ejs new file mode 100755 index 00000000..4abb2b8e --- /dev/null +++ b/layout/_partial/plugins/gitment.ejs @@ -0,0 +1,18 @@ +<% if (theme.gitment){ %> +
+
+ + + +
+<% } %> diff --git a/layout/_partial/post/comment.ejs b/layout/_partial/post/comment.ejs index 280e056c..10f8064f 100644 --- a/layout/_partial/post/comment.ejs +++ b/layout/_partial/post/comment.ejs @@ -13,4 +13,6 @@ key: post.slug, url: url }) %> + +<%- partial('../plugins/gitment') %> <%} %>