From 1757f3e2d7d62592cb6a036ffe9f65ccac4f06bd Mon Sep 17 00:00:00 2001 From: Joe Mooring Date: Tue, 24 Oct 2023 10:44:44 -0700 Subject: [PATCH] Access Disqus shortname from canonical location --- README.md | 11 +++++++++-- layouts/_default/single.html | 2 +- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index e939bf8..3e1d670 100644 --- a/README.md +++ b/README.md @@ -96,9 +96,16 @@ You may need to delete the line: `themesDir = "../.."` To enable comments, add following to your config file: -- DISQUS: `disqusShortname = YOURSHORTNAME` -- COMMENTO: +- DISQUS: + + ```toml + [services.disqus] + shortname = 'YOURSHORTNAME' ``` + +- COMMENTO: + + ```toml [params] commentoEnable = true ``` diff --git a/layouts/_default/single.html b/layouts/_default/single.html index 4e146af..05dc173 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -51,7 +51,7 @@ {{- .Content -}} {{- partial "tags.html" . -}}
- {{ if .Site.DisqusShortname }} + {{ if .Site.Config.Services.Disqus.Shortname }} {{ template "_internal/disqus.html" . }} {{ end }} {{ if .Site.Params.commentoEnable }}