Where does the universal Embed code go?

I was going through the disqus tutorial to add to my blog and it said:

In between a {% if page.comments %} and a {% endif %} tag, copy and paste the Universal Embed Code in the appropriate template where you'd like Disqus to load.

which doesn’t make sense to me. What exactly and where exactly am I suppose to paste that? I am super confused. My pages are just markdown so there is nowhere to paste this.


You add this to your layout(s) or _includes. Depends on how you have things built and where you want comments to show up on the page.

Im confused. I don’t have a layouts. How does a normal post.html file look?

I am going through this: https://www.youtube.com/watch?v=bDQsGdCWv4I right now.

I discovered these instructions: https://desiredpersona.com/disqus-comments-jekyll/

and I am stuck at this step:

Finally, open your posts layout file normally called post.html which is located in your _layouts folder and add the following liquid include tag just after the end tag. This will load Disqus comments right underneath your blog posts when Jekyll’s environment is set to production.

{% if site.disqus.shortname %}
  {% include disqus_comments.html %}
{% endif %}'

I am so closed. Just need to understand how the post.html file looks like.

If I could just see an example post.html and where the <article> tags are suppose to go then I’d know how to proceed.

Sounds like you’re using a theme gem (Minima?). The layouts aren’t exposed directly. Check Jekyll’s docs to learn more.

You’ll want to copy _layouts/post.html from the theme and add to your repo. Then you can modify and add the Disqus embed.

can you just post an example?

Is this enough?


   {{ content }}
{% if site.disqus.shortname %}
  {% include disqus_comments.html %}
{% endif %}

are you using the default minima theme? without knowing that it is hard to help you.

Minima looks like it supports comments by default, you just need to add to your config:

    shortname: my_disqus_shortname

https://github.com/jekyll/minima#enabling-comments-via-disqus – link to comments notes for that theme

I don’t use that theme, not real familiar with it, but if you are using it I think it may work. obviously you need to use your shortname not the default palceholder.

where is that supposed to go? Im confused where to put:

    shortname: my_disqus_shortname

Yes I think I was using the minima theme. So that bad? Is there a solution for

  1. Any theme
  2. minima theme


In the root of your site you should have a file called config.yml, it goes there - make sure you change it to your shortname.

If you are using the minima theme it should just need that. Any other theme it would need some work to setup I think.