aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorValentin Popov <valentineus@gmail.com>2018-01-13 18:38:01 +0300
committerValentin Popov <valentineus@gmail.com>2018-01-13 18:38:22 +0300
commit9c26bbb254236f5c8aea5d0125514a007d9b789f (patch)
tree9aa881cafd8b22eb9e36e4813ef1b3c4d117d319
parent4adacbf72839abb88bd2c69f4022cca6c2d20223 (diff)
downloadpopov.link-9c26bbb254236f5c8aea5d0125514a007d9b789f.tar.xz
popov.link-9c26bbb254236f5c8aea5d0125514a007d9b789f.zip
Integration of the comment system
-rw-r--r--_layouts/post.html17
-rw-r--r--_posts/2018-01-01-example-content.md7
2 files changed, 21 insertions, 3 deletions
diff --git a/_layouts/post.html b/_layouts/post.html
index 748d3a9..b511563 100644
--- a/_layouts/post.html
+++ b/_layouts/post.html
@@ -23,6 +23,23 @@ layout: default
</div>
+{% if page.comments %}
+ <div id="disqus_thread"></div>
+ <script type="text/javascript" defer>
+ var disqus_config = function () {
+ this.page.url = '{{ page.url | absolute_url }}';
+ this.page.identifier = '{{ page.url | absolute_url }}';
+ };
+
+ (function() {
+ var d = document, s = d.createElement('script');
+ s.src = 'https://valentineus-link.disqus.com/embed.js';
+ s.setAttribute('data-timestamp', +new Date());
+ (d.head || d.body).appendChild(s);
+ })();
+ </script>
+{% endif %}
+
<div class="pagination">
{% if page.next.url %}
<a href="{{ page.next.url | prepend: site.baseurl }}" class="left arrow">&#8592;</a>
diff --git a/_posts/2018-01-01-example-content.md b/_posts/2018-01-01-example-content.md
index ac02a02..e4846a2 100644
--- a/_posts/2018-01-01-example-content.md
+++ b/_posts/2018-01-01-example-content.md
@@ -1,7 +1,8 @@
---
-layout: post
-title: "Example Content"
-author: "Valentin Popov"
+layout: post
+comments: true
+title: "Example Content"
+author: "Valentin Popov"
---
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas tincidunt ornare nibh, non elementum augue tempus eget. Pellentesque tempus scelerisque iaculis. Nullam interdum ultricies nibh quis sollicitudin. Donec ornare fermentum facilisis. Ut at sem ac sem imperdiet varius a eget tortor. Nam eu augue eget orci semper maximus in eget augue. Mauris ornare, nisl ut suscipit consectetur, mi quam interdum tellus, at rutrum quam eros ultrices mi.