From 5b940fc48d14cd2aa01630557144f7e1d1aeb2d7 Mon Sep 17 00:00:00 2001 From: ElderJames Date: Fri, 28 Jul 2017 13:32:05 +0800 Subject: [PATCH] feat(comment): add gitment --- _config.template.yml | 7 ++++++- layout/_widget/comment/gitment/common.ejs | 15 +++++++++++++++ layout/_widget/comment/gitment/enter.ejs | 10 ++++++++++ layout/_widget/comment/gitment/main.ejs | 2 ++ 4 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 layout/_widget/comment/gitment/common.ejs create mode 100644 layout/_widget/comment/gitment/enter.ejs create mode 100644 layout/_widget/comment/gitment/main.ejs diff --git a/_config.template.yml b/_config.template.yml index dcc7b4020..29e94789c 100644 --- a/_config.template.yml +++ b/_config.template.yml @@ -208,7 +208,8 @@ sidebar: # Comment Systems # Available value of "use": -# disqus | disqus_click | changyan | livere +# disqus | disqus_click | changyan | livere | gitment +# If you want to use gitment,you should get the client_id and client_secret form https://github.com/settings/applications/new comment: use: shortname: # duoshuo or disqus shortname @@ -216,6 +217,10 @@ comment: changyan_conf: changyan_thread_key_type: path livere_data_uid: + gitment_repo: # git repo of the hexo + gitment_owner: # git repo's owner + gitment_client_id: # github app client id + gitment_client_secret : # github app client secret # Search Systems # Available value: diff --git a/layout/_widget/comment/gitment/common.ejs b/layout/_widget/comment/gitment/common.ejs new file mode 100644 index 000000000..05fc8a501 --- /dev/null +++ b/layout/_widget/comment/gitment/common.ejs @@ -0,0 +1,15 @@ + + + \ No newline at end of file diff --git a/layout/_widget/comment/gitment/enter.ejs b/layout/_widget/comment/gitment/enter.ejs new file mode 100644 index 000000000..eab8e03ff --- /dev/null +++ b/layout/_widget/comment/gitment/enter.ejs @@ -0,0 +1,10 @@ + +
+ <%- partial('_widget/comment/' + theme.comment.use + '/main') %> +
+ \ No newline at end of file diff --git a/layout/_widget/comment/gitment/main.ejs b/layout/_widget/comment/gitment/main.ejs new file mode 100644 index 000000000..c5bdd6460 --- /dev/null +++ b/layout/_widget/comment/gitment/main.ejs @@ -0,0 +1,2 @@ + +
\ No newline at end of file