diff options
author | Justin Mayer <entroP@gmail.com> | 2018-09-17 16:57:26 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-09-17 16:57:26 +0200 |
commit | 5d3f1eed080e97d395fdba90b5850fbfaef057a6 (patch) | |
tree | c5efd6dd02cc56fe50ea754290621bf716e9504e /pelican-bootstrap3/templates | |
parent | 1218221da141ee7b62947757c2e7dd87398c630b (diff) | |
parent | 10fdd0f4f5816a4e7a6b4f10b17213e106cc9563 (diff) | |
download | pelican-themes-5d3f1eed080e97d395fdba90b5850fbfaef057a6.tar.gz |
Merge pull request #582 from ganziqim/master
pelican-bootstrap3: Fix Disqus bug #581
Diffstat (limited to 'pelican-bootstrap3/templates')
-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 * * */ |