dsrkafuu / hugo-theme-fuji

A minimal Hugo theme with nice theme color. | 一个主题色极简 Hugo 主题。
https://github.dsrkafuu.net/hugo-theme-fuji/
Apache License 2.0
367 stars 97 forks source link

disqus comments are not getting loaded #81

Open itsraghz opened 3 years ago

itsraghz commented 3 years ago

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....

dsrkafuu commented 3 years ago

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.

itsraghz commented 3 years ago

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...