From 91df000ca82769a7578df81fa142d1a18e446bc0 Mon Sep 17 00:00:00 2001 From: Joe Mooring Date: Wed, 22 Nov 2023 08:05:23 -0800 Subject: [PATCH] Access Disqus shortname from canonical location (#660) --- README.md | 11 +++++++++-- layouts/_default/single.html | 2 +- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 5981a71..d2b2363 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 5aaf9ff..0365132 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 }}