From f4c1a8ce1e8b15024c294e1501862087f08a2b38 Mon Sep 17 00:00:00 2001 From: Joe Mooring Date: Mon, 17 Jun 2024 03:51:42 -0700 Subject: [PATCH] Update Disqus comments implementation notes (#2631) --- content/en/templates/embedded.md | 34 -------------------------------- 1 file changed, 34 deletions(-) diff --git a/content/en/templates/embedded.md b/content/en/templates/embedded.md index e6b3930c0..5b2043962 100644 --- a/content/en/templates/embedded.md +++ b/content/en/templates/embedded.md @@ -55,40 +55,6 @@ You can also set the following in the front matter for a given piece of content: - `disqus_title` - `disqus_url` -### Conditional loading of Disqus comments - -Users have noticed that enabling Disqus comments when running the Hugo web server on `localhost` (i.e. via `hugo server`) causes the creation of unwanted discussions on the associated Disqus account. - -You can create the following `layouts/partials/disqus.html`: - -{{< code file=layouts/partials/disqus.html >}} -
- - -comments powered by Disqus -{{< /code >}} - -The `if` statement skips the initialization of the Disqus comment injection when you are running on `localhost`. - -You can then render your custom Disqus partial template as follows: - -```go-html-template -{{ partial "disqus.html" . }} -``` - ## Google Analytics {{% note %}}