aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--pelican-bootstrap3/templates/includes/comments.html28
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 * * */