diff --git a/_config.yml b/_config.yml index 51924fe..9ce253f 100644 --- a/_config.yml +++ b/_config.yml @@ -77,6 +77,12 @@ paginate: 5 # Default YAML values (more information on Jekyll's site) defaults: + - + scope: + path: "" + type: "posts" + values: + comments: true # add comments to all blog posts - scope: path: "" # all files diff --git a/_layouts/page.html b/_layouts/page.html index 5b9a3f1..cfb48e9 100644 --- a/_layouts/page.html +++ b/_layouts/page.html @@ -21,5 +21,10 @@ layout: default
{{ content }} + {% if page.comments %} +
+ {% include disqus.html %} +
+ {% endif %}
diff --git a/_layouts/post.html b/_layouts/post.html index 918483b..2d17530 100644 --- a/_layouts/post.html +++ b/_layouts/post.html @@ -41,8 +41,10 @@ layout: default -
+{% if page.comments %} +
{% include disqus.html %}
+{% endif %} diff --git a/css/main.css b/css/main.css index c609eae..1208181 100644 --- a/css/main.css +++ b/css/main.css @@ -77,6 +77,16 @@ img::-moz-selection { background: transparent; } +.disqus-comments { + margin-top: 30px; +} + +@media only screen and (min-width: 768px) { + .disqus-comments { + margin-top: 40px; + } +} + /* --- Navbar --- */ .navbar-custom { @@ -322,16 +332,6 @@ header.header-post .post-heading .post-subheading { border-bottom-left-radius: 5px; } -.blog-comments { - margin-top: 30px; -} - -@media only screen and (min-width: 768px) { - .blog-comments { - margin-top: 40px; - } -} - /* --- Pager --- */ .pager li a {