From 2f5ecf49dfa0111edbb9c8d6666dd5d5bfbf500c Mon Sep 17 00:00:00 2001 From: Jerome Paul Esteban Date: Tue, 13 Sep 2016 21:24:24 +0800 Subject: [PATCH] Add Muut comments Muut comments are added to the bottom of `.post`s if the user has included a Muut community name parameter in `config.toml`. Comments can be disabled from individual posts by putting `comments = false` in the frontmatter. --- README.md | 2 ++ layouts/_default/single.html | 7 +++++++ 2 files changed, 9 insertions(+) diff --git a/README.md b/README.md index 61065d6..df82a6c 100644 --- a/README.md +++ b/README.md @@ -38,6 +38,7 @@ paginate = 10 copyright = "© 2016 Copyright Text" canonifyurls = true googleAnalytics = "Your Tracking Id" # optional +muut = "Your Muut community name" # optional # optional [[menu.header]] @@ -74,6 +75,7 @@ title = "my new post" date = "2016-09-01" tags = ["x", "y"] categories = ["x", "y"] +comments = "true", "false" # optional +++ content here diff --git a/layouts/_default/single.html b/layouts/_default/single.html index f936912..7de1f2d 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -18,6 +18,13 @@

{{ .Title }}

{{ .Content }} {{ if eq .Type "post" }} + {{ if .Site.Params.muut }} + {{ if not (eq .Params.comments false) }} +
+ {{ .Title }} + + {{ end }} + {{ end }}