hugo/content/en/content-management/comments.md
Bjørn Erik Pedersen 9aec42c545 Squashed 'docs/' changes from 686c7b6eb..7ef2dbce4
7ef2dbce4 Cleanup RSS templates page
0e23d5e1a Fix multilingual permalinks example
b3c342b07 Update faq.md
f73109ae2 Regen CLI docs
ac6ee2027 Fix minor nitpicks (#2233)
f24fcffe1 Mention the Giscus comments system (#2234)
418fa981e Remove reference to Ghost migration tool
94a76df29 Adjust table layout
e263ad6b9 content: Fix typos
fd1eb26b5 Update featured image in digital.gov showcase
d3d946555 Correct directory description
bbe1dff56 Use sentence case for heading
acfa0be54 Add hosting provider fetch depth to GitInfo variables page
d78c427e6 Fix typo
751517fea Fix spelling mistake
cdd77aa9a Update content for v0.118.0
c77d09b1c Format netlify.toml
d5a6c4f51 netlify: Hugo 0.118.1
8c717301a Revert "netlify: Hugo 0.118.0"
a9b2ef5c2 netlify: Hugo 0.118.0
61959591c Merge commit '77b976dd92b4f66657d83d875aef0c617df492d9'
95f2029a1 docs: Regen docs helper
fd57ba960 markup/goldmark: Add CJK extension
2bfb3bf4c docshelper: Improve template lookup order descriptions
b0baa890e cache: Hide IsResourceDir from the exported config
b4b071ea0 docs: Replace docs.json with docs.yaml

git-subtree-dir: docs
git-subtree-split: 7ef2dbce4ad728d32c218761c6cfbe2f58f8da16
2023-09-24 11:54:45 +02:00

2.9 KiB

title description keywords categories menu toc weight aliases
Comments Hugo ships with an internal Disqus template, but this isn't the only commenting system that will work with your new Hugo website.
sections
content
organization
project organization
docs
parent weight
content-management 220
true 220
/extras/comments/

Hugo ships with support for Disqus, a third-party service that provides comment and community capabilities to websites via JavaScript.

Your theme may already support Disqus, but if not, it is easy to add to your templates via Hugo's built-in Disqus partial.

Add Disqus

Hugo comes with all the code you need to load Disqus into your templates. Before adding Disqus to your site, you'll need to set up an account.

Configure Disqus

Disqus comments require you set a single value in your site's configuration file like so:

{{< code-toggle copy=false >}} disqusShortname = "yourDisqusShortname" {{</ code-toggle >}}

For many websites, this is enough configuration. However, you also have the option to set the following in the front matter of a single content file:

  • disqus_identifier
  • disqus_title
  • disqus_url

Render Hugo's built-in Disqus partial template

Disqus has its own internal template available, to render it add the following code where you want comments to appear:

{{ template "_internal/disqus.html" . }}

Alternatives

These are some alternatives to Disqus: