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

Comments with disqus enabled? #59

Open
sebfischer83 opened this issue Apr 18, 2022 · 2 comments
Open

Comments with disqus enabled? #59

sebfischer83 opened this issue Apr 18, 2022 · 2 comments

Comments

@sebfischer83
Copy link

Hi,

is disqus possible with this theme? I configured it but nothing shows up.

@cr105ph1nx
Copy link

Yes it is possible. You just go to this URL and follow the instructions: https://disqus.com/admin/create/
They'll give you a script that you need to paste on any of the pages you want the disqus section to appear. I chose to put it in layouts/_default/single.html. I also recommend that you uncomment and edit the config settings like they suggest.

Here's a demo of how it looks like if you're interested.

is disqus possible with this theme? I configured it but nothing shows up.

You said you configured it but nothing shows up, do you mind giving more information on what do you think is causing this problem so that we can help you?

@chris-gillatt
Copy link
Contributor

As @cr105ph1nx said, edit layouts/_default/single.html and add:

  <div id="disqus_thread"></div>
  <script>
      var disqus_config = function () {
      this.page.url = "{{ .Site.BaseURL }}";  
      this.page.identifier = "{{ .Title }}"; 
      };
      (function() { // DON'T EDIT BELOW THIS LINE
      var d = document, s = d.createElement('script');
      s.src = 'https://yourDisqusShortname .disqus.com/embed.js';
      s.setAttribute('data-timestamp', +new Date());
      (d.head || d.body).appendChild(s);
      })();
  </script>
  <noscript>Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>

Don't forget to update yourDisqusShortname.

You probably want to paste it below {{- partial "social.html" . -}} in the existing code.

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

No branches or pull requests

3 participants