diff options
-rw-r--r-- | README.md | 4 | ||||
-rw-r--r-- | layouts/_default/single.html | 7 |
2 files changed, 11 insertions, 0 deletions
@@ -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 }} |