Adjust comments to be compatible with compress_html (#2373)

This commit is contained in:
Johannes Ganzenmüller 2020-01-14 18:43:14 +01:00 committed by Michael Rose
parent 0ce6c0d648
commit 741b6dcb10

View file

@ -1,10 +1,10 @@
{% if site.comments.disqus.shortname %} {% if site.comments.disqus.shortname %}
<script> <script>
var disqus_config = function () { var disqus_config = function () {
this.page.url = "{{ page.url | absolute_url }}"; // Replace PAGE_URL with your page's canonical URL variable this.page.url = "{{ page.url | absolute_url }}"; /* Replace PAGE_URL with your page's canonical URL variable */
this.page.identifier = "{{ page.id }}"; // Replace PAGE_IDENTIFIER with your page's unique identifier variable this.page.identifier = "{{ page.id }}"; /* Replace PAGE_IDENTIFIER with your page's unique identifier variable */
}; };
(function() { // DON'T EDIT BELOW THIS LINE (function() { /* DON'T EDIT BELOW THIS LINE */
var d = document, s = d.createElement('script'); var d = document, s = d.createElement('script');
s.src = 'https://{{ site.comments.disqus.shortname }}.disqus.com/embed.js'; s.src = 'https://{{ site.comments.disqus.shortname }}.disqus.com/embed.js';
s.setAttribute('data-timestamp', +new Date()); s.setAttribute('data-timestamp', +new Date());