diff options
author | karthik <kskarthik@gitlab.io> | 2019-12-04 16:24:26 +0300 |
---|---|---|
committer | karthik <kskarthik@gitlab.io> | 2019-12-04 16:24:26 +0300 |
commit | 01b42fd489eec2c7a07214c605fff2406e336899 (patch) | |
tree | a649a0bddbc0f123781099cf93a83aa6e477f2b6 | |
parent | 1a7af57c476e2bbc131167b0ddb671b971a13199 (diff) |
add disqus & analytics
-rw-r--r-- | layouts/_default/single.html | 6 | ||||
-rw-r--r-- | layouts/index.html | 2 | ||||
-rw-r--r-- | layouts/partials/footer.html | 3 |
3 files changed, 9 insertions, 2 deletions
diff --git a/layouts/_default/single.html b/layouts/_default/single.html index 6369bec..f36d519 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -10,8 +10,12 @@ <span class='badge badge-dark'><a class='text-white' href='{{ "tags/" | absURL }}{{ . | lower }}'>{{ . }}</a></span> {{ end }} </code> + <div class="container mt-2" id="comments"> + {{if .Site.Params.disqus }} + {{ template "_internal/disqus.html" . }} + {{end}} + </div> </section> - {{else}} <section class="container text-monospace text-justified mt-3"> <h2 class="text-center">{{.Title}}</h2> diff --git a/layouts/index.html b/layouts/index.html index de114d1..f6ce3e7 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -1,7 +1,7 @@ {{define "main"}} {{- partial "hero.html" . -}} <section id="posts" class="container text-center text-monospace mt-4"> - <h3>Recent Posts</h3> + <h3>Recent Posts</h3> <div class="text-center"> {{range first 5 .Site.RegularPages }} {{if eq .Section "post"}} diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html index a1b7d6c..4ff1c0b 100644 --- a/layouts/partials/footer.html +++ b/layouts/partials/footer.html @@ -2,4 +2,7 @@ <div class="container-fluid bg-dark text-white text-monospace text-center mt-4"> <small>{{.Site.Copyright}} | Powered by <a href="https://gohugo.io">Hugo</a></small> </div> + {{ if .Site.Params.analytics }} + {{ template "_internal/google_analytics.html" . }} +{{ end }} </footer> |