diff --git a/pelicanconf.py b/pelicanconf.py index aec81d6..9fd9cfd 100644 --- a/pelicanconf.py +++ b/pelicanconf.py @@ -25,7 +25,7 @@ DEFAULT_PAGINATION = 4 ### Plugins ### PLUGIN_PATHS = ['../pelican-plugins'] -PLUGINS = ['extract_toc', 'sitemap', 'tipue_search'] +PLUGINS = ['pelican_comment_system', 'extract_toc', 'sitemap', 'tipue_search'] #sitemap SITEMAP = { diff --git a/theme/static/js/comments.js b/theme/static/js/comments.js index dab978c..2625428 100644 --- a/theme/static/js/comments.js +++ b/theme/static/js/comments.js @@ -5,7 +5,7 @@ var CommentSystem = { display_replyto_html: function(comment_content, article_slug, author) {return ''}, cancelReply: function() { - $('#commentForm_replyto').val(""); + $('#pcs-comment-form-input-replyto').val(""); $('#pcs-comment-form-display-replyto').hide(); }, diff --git a/theme/templates/_includes/comments.html b/theme/templates/_includes/comments.html index 2b38cce..60b0f1f 100644 --- a/theme/templates/_includes/comments.html +++ b/theme/templates/_includes/comments.html @@ -1,5 +1,8 @@ {% macro comments_section(article) %} +{% import 'pcs/comments.html' as pcs with context %} +{% set use_pcs = True %} + {% from '_includes/_defaults.html' import DISQUS_FILTER, UTTERANCES_FILTER, COMMENTBOX_FILTER with context %} {% set use_disqus = (not DISQUS_FILTER or article.disqus_filter == "off") and DISQUS_SITENAME and article.disqus_filter != "on" %} @@ -22,7 +25,7 @@ {% set intro = article.comments_intro %} {% endif %} -{% if article.status != 'draft' and article.comments != 'False' and (use_disqus or use_utterances or use_commentbox) %} +{% if article.status != 'draft' and article.comments != 'False' and (use_disqus or use_utterances or use_commentbox or use_pcs) %}
Comments
@@ -61,6 +64,8 @@ {% from '_includes/commentbox_scripts.html' import comments_script_commentbox with context %} {{ comments_script_commentbox(COMMENTBOX_PROJECT, identifier) }} {% endif %} + + {{ pcs.comments_quickstart("blog.victorhery", "victor-hery.com") }} diff --git a/theme/templates/pcs/comments.html b/theme/templates/pcs/comments.html index dfde149..a3e0bd9 100644 --- a/theme/templates/pcs/comments.html +++ b/theme/templates/pcs/comments.html @@ -74,10 +74,6 @@ {% macro comments_with_form() %} {% if PELICAN_COMMENT_SYSTEM %}
-
-

Commentaires / Comments

-
-
{% if article.comments %}