Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/pjbakker/flexible-seo-hugo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul <paul@brainspark.nl>2020-04-01 23:56:14 +0300
committerPaul <paul@brainspark.nl>2020-04-01 23:56:24 +0300
commite814758445faaa43bf7e50c7b678d27882c30ecb (patch)
tree0c5a011ba58d4dbcd8442d68fbb4153d0175cb0d
parent214c53d253e90840cd15c279acbda91d1966ff1f (diff)
Support for Disqus with ability to disable in pages
-rw-r--r--README.md4
-rw-r--r--layouts/_default/single.html7
2 files changed, 11 insertions, 0 deletions
diff --git a/README.md b/README.md
index 9de8874..c0980ab 100644
--- a/README.md
+++ b/README.md
@@ -73,6 +73,10 @@ After Bootstrap and this theme's CSS file (*/static/css/theme.css*), the empty l
Assuming you already signed up for [Google Analytics](https://www.google.com/analytics/), you can add your Google Tracking ID to the `googleAnalytics` parameter in `config.toml`. It will then automatically include Google Analytics code in your site.
+## Disqus support
+
+When `DisqusShortname` is set in your site's config, all regular pages will have Disqus enabled at the bottom. You can disable this on a page-by-page basis by setting `comments` to `false` in a page's front matter.
+
## License
MIT Licensed, see [LICENSE](https://github.com/pjbakker/flexible-seo-hugo/blob/master/LICENSE).
diff --git a/layouts/_default/single.html b/layouts/_default/single.html
index e2d4df6..cd6add4 100644
--- a/layouts/_default/single.html
+++ b/layouts/_default/single.html
@@ -40,6 +40,13 @@
</div>
{{ end }}
</div>
+ {{ if and .Site.DisqusShortname ( ne .Params.comments false ) -}}
+ <div class="row justify-content-center pt-3">
+ <div class="col-lg-8">
+ {{ template "_internal/disqus.html" . }}
+ </div>
+ </div>
+ {{ end }}
</article>
</div>
{{ end }}