diff --git a/_config.yml b/_config.yml index 8c7eec5..aa3a19e 100644 --- a/_config.yml +++ b/_config.yml @@ -87,9 +87,11 @@ avatar: '/commons/avatar.jpg' # boolean type, the global switch for ToC in posts. toc: true -disqus: - comments: false # boolean type, the global switch for posts comments. - shortname: '' # Fill with your Disqus shortname. › https://help.disqus.com/en/articles/1717111-what-s-a-shortname +comments: + active: # The global switch for posts comments, e.g., 'disqus'. Keep it empty means disable + # The comment active options are as follows + disqus: + shortname: # fill with the Disqus shortname. › https://help.disqus.com/en/articles/1717111-what-s-a-shortname paginate: 10 diff --git a/_includes/comments.html b/_includes/comments.html new file mode 100644 index 0000000..3935aca --- /dev/null +++ b/_includes/comments.html @@ -0,0 +1,4 @@ + +{% if page.comments and site.comments.active %} + {% include {{ site.comments.active | append: '.html' }} %} +{% endif %} diff --git a/_includes/disqus.html b/_includes/disqus.html index f4897c8..8b4e633 100644 --- a/_includes/disqus.html +++ b/_includes/disqus.html @@ -1,9 +1,6 @@ - -{% if site.disqus.comments and page.comments %} -
Comments powered by Disqus. @@ -11,6 +8,7 @@