Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] Disqus comments not working #212

Closed
robwirving opened this issue Aug 15, 2019 · 0 comments · Fixed by #213
Closed

[Bug] Disqus comments not working #212

robwirving opened this issue Aug 15, 2019 · 0 comments · Fixed by #213

Comments

@robwirving
Copy link
Contributor

I have tried setting the disqusShortname in my config.toml and don't see disqus comments appearing on my site. I have noticed a few things that I believe are related:

in partials/disqus.html it reads the shortname from .Site.DisqusShortname but this partial is only included if .Site.Params.disqusShortname is set in the single.html partial.

If you try to fix the above error by setting both .Site.DisqusShortname and .Site.Params.disqusShortname, or by changing the variables to match then hugo produces an error in disqus.html:

partials/disqus.html:11:36: executing "partials/disqus.html" at <.Site.Params.disqusshortname>: can't evaluate field Site in type string

I've found that this can be resolve by removing the . when including the disqus.html partial

{{ partial "disqus.html" }}

After doing the above I see "comments powered by Disqus" appear

@robwirving robwirving changed the title Disqus comments not working [Bug] Disqus comments not working Aug 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant