11{% macro comments_section(article) %}
22
3- {% from '_includes/_defaults.html' import DISQUS_FILTER, UTTERANCES_FILTER with context %}
3+ {% from '_includes/_defaults.html' import DISQUS_FILTER, UTTERANCES_FILTER, COMMENTBOX_FILTER with context %}
44
55{% set use_disqus = (not DISQUS_FILTER or article.disqus_filter == "off") and DISQUS_SITENAME and article.disqus_filter != "on" %}
66
77{% set use_utterances = (not UTTERANCES_FILTER or article.utterances_filter == "off") and UTTERANCES_REPO and article.utterances_filter != "on" %}
88
9+ {% set use_commentbox = (not COMMENTBOX_FILTER or article.commentbox_filter == "off") and COMMENTBOX_PROJECT and article.commentbox_filter != "on" %}
10+
911{% set url = SITEURL+ '/' + article.url %}
1012{% set identifier = SITEURL+ '/' + article.url %}
1113{% if article.comment_id %}
2022{% set intro = article.comments_intro %}
2123{% endif %}
2224
23- {% if article.status != 'draft' and article.comments != 'False' and (use_disqus or use_utterances) %}
25+ {% if article.status != 'draft' and article.comments != 'False' and (use_disqus or use_utterances or use_commentbox ) %}
2426
2527< section >
2628 < h6 style ="display:none; "> Comments</ h6 >
@@ -29,7 +31,7 @@ <h6 style="display:none;">Comments</h6>
2931 < div class ="accordion " id ="accordion2 ">
3032 < div class ="accordion-group ">
3133 < div class ="accordion-heading ">
32- < a class ="accordion-toggle disqus-comment-count comment-count "
34+ < a class ="accordion-toggle disqus-comment-count comment-count collapsed "
3335 data-toggle ="collapse "
3436 data-parent ="#accordion2 "
3537 {% if use_disqus %}
@@ -53,6 +55,12 @@ <h6 style="display:none;">Comments</h6>
5355 {% from '_includes/utterances_scripts.html' import comments_script_utterances with context %}
5456 {{ comments_script_utterances(UTTERANCES_REPO, identifier, UTTERANCES_LABEL, UTTERANCES_THEME) }}
5557 {% endif %}
58+
59+
60+ {% if use_commentbox %}
61+ {% from '_includes/commentbox_scripts.html' import comments_script_commentbox with context %}
62+ {{ comments_script_commentbox(COMMENTBOX_PROJECT, identifier) }}
63+ {% endif %}
5664 </ div >
5765 </ div >
5866 </ div >
0 commit comments