HUGO

Hugo - Fuji Theme - disqus comments are not loaded

Hi,

I am newbie to Hugo and I use my site with the Fuji theme.

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 changes

[params]
   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\partials to layouts\partials.

Any help would be highly appreciated.

Cheers,
RM…

You would get a more informed reply if you asked the theme author by opening an issue at the theme’s GitHub repo.

1 Like

Thanks @onedrawingperday . Yes, indeed. I had raised an issue in the Fuji Theme’s github repo and forgot to mention it earlier. disqus comments are not getting loaded · Issue #81 · dsrkafuu/hugo-theme-fuji · GitHub.

I will share an update here if I get a solution from the theme author @DSRKafuU .

Cheers,
RM…

Just got an update from the theme author @DSRKafuU on the Github Page disqus comments are not getting loaded · Issue #81 · dsrkafuu/hugo-theme-fuji · GitHub

So, the learning was :

  1. I had to update my disqusShortname correctly - which is nothing but the website name what was configured in the disqus profile. Earlier I had used my login name itsraghz which did not work.
  2. It is sufficient to use only disqusShortname and I had used both disqusShortname and disqusJsApi. Commenting out the later had helped.

One relevant Q. I always need to click on the link to load the disqus comments. Why so? Can I not get them available by default? If so, how can I achieve this? @DSRKafuU @funkydan2 any help would be appreciated.

Cheers,
RM…

Your question is not related to Hugo as it is about JS.

However deferred loading of the Disqus comments is a privacy feature (there has been at least one topic offering a techique to achieve it).

Disqus comments come with user tracking and if the comments were loaded on a page by default it would not be compliant with the privacy regulations (GDPR) in the EU.

I am no fan of Disqus because of their mining user and visitor data and also I find the ads they serve of the lesser quality type. I would really not want to associate my content with such a service.

There are better and more privacy friendly commenting services out there like: Isso, Utterances, Talkyard or the new Welcomments -that offers pre-rendered HTML static comments-.

Also there have been forum topics about these services, so if you perform a forum search you may find instructions about setting them up in a Hugo project.

1 Like

Thank you @onedrawingperday for the insights. I know about the GDPR but not the connection to it with the Disqus.

Thank you for the yet another insight!

Thank you for the great expert advice. I will surely check them out and also for the relevant topics in the forum.

The trick I presume may be is the integration of such services into the Hugo Theme what we use, but guess mostly we have a way - as part of the general contract we have for the plugins. I will update you with my findings.

Cheers,
RM…

As per lines 80-83 of the Fuji theme’s example config there is already support for Utterances.

Disabling Disqus on your theme is simply a matter of not enabling the relevant parameters.

You can always override a theme by providing your own modified templates under:
<project-root>/layouts/

1 Like

So sweet of you @onedrawingperday ! Thank you very much. I will check it out and update you.

Another QQ. How do you generate the link to a particular line in Github Repo? Is it manually we specify the parameters with L? or is there an another better alternate?

You click on the line number and if you want to reference multiple lines after clicking the first one you hold down the Shift key and then click on the second line number.

Then simply copy the URL from the browser’s address bar.

Basically on GitHub the line numbers of a file are also page anchors to a respective line.

1 Like

Great, this does the trick. Thank you :slight_smile: :cowboy_hat_face:

But is this only with GitHub I suppose, as I have not seen this feature elsewhere.

Cheers,
RM…