diff options
author | Curtis Timson <curt@live.co.uk> | 2018-02-11 17:03:06 +0300 |
---|---|---|
committer | Curtis Timson <curt@live.co.uk> | 2018-02-11 17:03:06 +0300 |
commit | c151fba97911dfce2169b3ab6d972e2d5937390b (patch) | |
tree | cba89a3fb94d49c86b65c160317687c0889043ec | |
parent | e8211aba06f83cc70335153432c57d932fab745f (diff) |
:sparkles: Add ability to disable comments on post
-rw-r--r-- | exampleSite/content/post/05-post.md | 9 | ||||
-rw-r--r-- | layouts/partials/blog.html | 2 |
2 files changed, 6 insertions, 5 deletions
diff --git a/exampleSite/content/post/05-post.md b/exampleSite/content/post/05-post.md index 3b165bd..398d076 100644 --- a/exampleSite/content/post/05-post.md +++ b/exampleSite/content/post/05-post.md @@ -1,12 +1,11 @@ +++ -description = "Fifth post description" +description = "An example of a blog post where comments are not allowed" date = "2018-01-05T00:00:00" thumbnail = "images/pic08.jpg" image = "images/pic01.jpg" -title = "Fifth post" -slug = "fifth-post" +title = "No Comments Allowed" +slug = "no-comments-allowed" author = "John Smith" draft = false -disqusid = "5" +++ -Testing content
\ No newline at end of file +This is an example of a blog post where comments are not allowed.
\ No newline at end of file diff --git a/layouts/partials/blog.html b/layouts/partials/blog.html index b9eaf98..bd0b819 100644 --- a/layouts/partials/blog.html +++ b/layouts/partials/blog.html @@ -16,7 +16,9 @@ <footer> <ul class="actions"> <li><a href="{{ .Permalink }}" class="button icon fa-file-text">Continue Reading</a></li> + {{ if .Params.disqusid }} <li><a href="{{ .Permalink }}" class="button alt icon fa-comment disqus-comment-count" data-disqus-identifier="{{ .Params.disqusid }}">0 Comments</a></li> + {{ end }} </ul> <span class="" ></span> </footer> |