diff options
author | ganziqim <ganziqim@live.com> | 2018-09-16 18:26:53 +0800 |
---|---|---|
committer | ganziqim <ganziqim@live.com> | 2018-09-16 18:26:53 +0800 |
commit | 10fdd0f4f5816a4e7a6b4f10b17213e106cc9563 (patch) | |
tree | c5efd6dd02cc56fe50ea754290621bf716e9504e /pelican-bootstrap3 | |
parent | 1218221da141ee7b62947757c2e7dd87398c630b (diff) | |
download | pelican-themes-10fdd0f4f5816a4e7a6b4f10b17213e106cc9563.tar.gz |
Fix: pelican-bootstrap3 DISQUS bug
Diffstat (limited to 'pelican-bootstrap3')
-rw-r--r-- | pelican-bootstrap3/templates/includes/comments.html | 28 |
1 files changed, 16 insertions, 12 deletions
diff --git a/pelican-bootstrap3/templates/includes/comments.html b/pelican-bootstrap3/templates/includes/comments.html index b37e2bf..4fe6406 100644 --- a/pelican-bootstrap3/templates/includes/comments.html +++ b/pelican-bootstrap3/templates/includes/comments.html @@ -8,20 +8,24 @@ /* * * 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 * * */ |