diff --git a/themes/next/_config.yml b/themes/next/_config.yml index 74b5f25e..a5bb97de 100644 --- a/themes/next/_config.yml +++ b/themes/next/_config.yml @@ -408,7 +408,7 @@ valine: # Introduction: https://imsun.net/posts/gitment-introduction/ # You can get your Github ID from https://api.github.com/users/ gitment: - enable: true + enable: false mint: true # RECOMMEND, A mint on Gitment, to support count, language and proxy_gateway count: true # Show comments count in post meta area lazy: false # Comments lazy loading with a button @@ -421,6 +421,15 @@ gitment: proxy_gateway: # Address of api proxy, See: https://github.com/aimingoo/intersect redirect_protocol: # Protocol of redirect_uri with force_redirect_protocol when mint enabled +gitalk: + enable: true + github_user: Cool-Y + github_repo: gitment-comments + client_id: 180955a2c3ae3d966d9a + client_secret: 1c5db4da72df5e6fc318d12afe5f4406f7c54343 + admin: Cool-Y + distractionFreeMode: true + # Baidu Share # Available value: # button | slide diff --git a/themes/next/layout/_partials/comments.swig b/themes/next/layout/_partials/comments.swig index cee31144..86676221 100644 --- a/themes/next/layout/_partials/comments.swig +++ b/themes/next/layout/_partials/comments.swig @@ -62,6 +62,11 @@ {% endif %} + {% elseif theme.gitalk.enable %} +
+
+
+ {% elseif theme.valine.appid and theme.valine.appkey %}
diff --git a/themes/next/layout/_third-party/comments/gitalk.swig b/themes/next/layout/_third-party/comments/gitalk.swig new file mode 100644 index 00000000..8a01d219 --- /dev/null +++ b/themes/next/layout/_third-party/comments/gitalk.swig @@ -0,0 +1,30 @@ +{% if not (theme.duoshuo and theme.duoshuo.shortname) and not theme.duoshuo_shortname %} +{% if theme.gitalk.enable and theme.gitalk.client_id %} + + {% set CommentsClass = "Gitalk" %} + + + + + {% if page.comments %} + + {% endif %} + +{% endif %} +{% endif %} diff --git a/themes/next/layout/_third-party/comments/index.swig b/themes/next/layout/_third-party/comments/index.swig index b2da2320..8df7ca54 100644 --- a/themes/next/layout/_third-party/comments/index.swig +++ b/themes/next/layout/_third-party/comments/index.swig @@ -6,3 +6,4 @@ {% include 'changyan.swig' %} {% include 'gitment.swig' %} {% include 'valine.swig' %} +{% include 'gitalk.swig' %}