Permalink
Browse files

Fix: pelican-bootstrap3 DISQUS bug

  • Loading branch information...
ganziqim committed Sep 16, 2018
1 parent 1218221 commit 10fdd0f4f5816a4e7a6b4f10b17213e106cc9563
Showing with 16 additions and 12 deletions.
  1. +16 −12 pelican-bootstrap3/templates/includes/comments.html
@@ -8,20 +8,24 @@ <h2>{{ _('Comments') }}</h2>
/* * * CONFIGURATION VARIABLES: EDIT BEFORE PASTING INTO YOUR WEBPAGE * * */
var disqus_shortname = '{{ DISQUS_SITENAME }}'; // required: replace example with your forum shortname
{% if article %}
{% if not DISQUS_NO_ID %}
var disqus_identifier = '{{ article.date|strftime('%Y-%m-') ~ article.slug if DISQUS_ID_PREFIX_SLUG else article.slug }}';
{% endif %}
var disqus_url = '{{ SITEURL }}/{{ article.url }}';
{% elif page %}
{% if not DISQUS_NO_ID %}
var disqus_identifier = 'page-{{ page.slug }}';
{% endif %}
var disqus_url = '{{ SITEURL }}/{{ page.url }}';
{% endif %}
var disqus_config = function () {
this.language = "{{ DEFAULT_LANG }}";
{% if article %}
{% if not DISQUS_NO_ID %}
this.page.identifier = '{{ article.date|strftime('%Y-%m-%d-') ~ article.slug }}';
{% endif %}
{% if SITEURL %}
this.page.url = '{{ SITEURL }}/{{ article.url }}';
{% endif %}
{% elif page %}
{% if not DISQUS_NO_ID %}
this.page.identifier = 'page-{{ page.slug }}';
{% endif %}
{% if SITEURL %}
this.page.url = '{{ SITEURL }}/{{ page.url }}';
{% endif %}
{% endif %}
};
/* * * DON'T EDIT BELOW THIS LINE * * */

0 comments on commit 10fdd0f

Please sign in to comment.