diff options
author | guangmean <guangmean@outlook.com> | 2022-04-18 07:54:09 +0300 |
---|---|---|
committer | guangmean <guangmean@outlook.com> | 2022-04-18 07:54:09 +0300 |
commit | 6089fdb936f783fcfc4d0d741d69f4acbb83b699 (patch) | |
tree | f48161052e8bd60413c19b1a0e8f5e738d50d5f6 | |
parent | 587bcc611b45bfdc3adb6cfdac95cde71f3aafb9 (diff) |
Add Disqus Comments
Add disqusShortname config in your site config.toml to support comments
-rw-r--r-- | README.md | 1 | ||||
-rw-r--r-- | layouts/_default/single.html | 4 |
2 files changed, 4 insertions, 1 deletions
@@ -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> |