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

github.com/guangmean/Niello.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorguangmean <guangmean@outlook.com>2022-04-18 07:54:09 +0300
committerguangmean <guangmean@outlook.com>2022-04-18 07:54:09 +0300
commit6089fdb936f783fcfc4d0d741d69f4acbb83b699 (patch)
treef48161052e8bd60413c19b1a0e8f5e738d50d5f6
parent587bcc611b45bfdc3adb6cfdac95cde71f3aafb9 (diff)
Add Disqus Comments
Add disqusShortname config in your site config.toml to support comments
-rw-r--r--README.md1
-rw-r--r--layouts/_default/single.html4
2 files changed, 4 insertions, 1 deletions
diff --git a/README.md b/README.md
index 9d7b0db..441939c 100644
--- a/README.md
+++ b/README.md
@@ -35,6 +35,7 @@ This is an example of site config.toml:
baseURL = "https://www.angularcorp.com/"
languageCode = "en-us"
title = "Application Deveopment"
+disqusShortname = "yourDisqusShortname" // Add third-party comments system
staticDir = ["static", "themes/Niello/static"]
diff --git a/layouts/_default/single.html b/layouts/_default/single.html
index 4d2dd17..6d500e0 100644
--- a/layouts/_default/single.html
+++ b/layouts/_default/single.html
@@ -28,13 +28,15 @@
<div class="less">Page link: <a href="{{ .RelPermalink }}" class="pagelink">{{ .RelPermalink }}</a></div>
<div class="line-dotted"></div>
<article>
+ {{ if gt (len .Site.DisqusShortname) 2 }}
+ {{ template "_internal/disqus.html" . }}
+ {{ end }}
</div>
{{ partial "footer.html" . }}
</div>
{{ partial "banner.html" . }}
</div>
-
{{ partial "foot.html" . }}
</body>
</html>