hugo-theme-fuji icon indicating copy to clipboard operation
hugo-theme-fuji copied to clipboard

disqus comments are not getting loaded

Open itsraghz opened this issue 3 years ago • 2 comments

Hi @dsrkafuu , I need your help in getting the disqus comments loaded in my blog post. As per the config given in the exampleSite, I have the following in my config.toml file but still I don't get the disqus comments loaded.

FYI, I am an existing user of disqus and I certainly have a good amount of comments available in my account with disqus.

config.toml file ` show_comments = true

disqusShortname = "itsraghz" \ # If you want to use DisqusJS, please remember to set disqusJSApi to anything in your config.toml to load CSS. disqusJSApi = "itsraghz" disqus_identifier = "itsraghz" `

Also I copied the comments-*.html file from theme\layouts\partialstolayouts\partials`.

Any help would be highly appreciated.

Cheers, RM....

itsraghz avatar Jun 16 '21 20:06 itsraghz

Only disqusShortname is needed if you don't use https://github.com/SukkaW/DisqusJS.

In https://github.com/dsrkafuu/hugo-theme-fuji/blob/master/layouts/partials/comment-disqus.html, default disqus settings are:

this.page.url = '{{ .Permalink }}';
this.page.identifier = '{{ .File.ContentBaseName }}';

You can also change the post identifier if needed.

dsrkafuu avatar Jun 20 '21 01:06 dsrkafuu

Thanks @dsrkafuu . It worked as long as I commented out the disqusJsApi and retained only the disqusShortname :) Also I updated the name matching with what I had configured in the website 'raghsonline' - (earlier I had configured with my login username - itsraghz). That was another bug!

Now, one other QQ. Why doesn't it always get displayed? I need to click on 'Load disqus comments' . I remember somewhere it was for an optimization of bandwidth. Isnt't it? Can we turn it on always in the PROD site?

image

image

Cheers, RM...

itsraghz avatar Jun 20 '21 19:06 itsraghz