# Where does the universal Embed code go?

**URL:** <https://talk.jekyllrb.com/t/where-does-the-universal-embed-code-go/3340>\
**Category:** Uncategorized\
**Created:** [September 11, 2019, 1:58am UTC](https://talk.jekyllrb.com/t/where-does-the-universal-embed-code-go/3340 "2019-09-11T01:58:04Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![Pinocchio](https://avatars.discourse-cdn.com/v4/letter/p/f07891/32.png) [@Pinocchio](https://talk.jekyllrb.com/u/Pinocchio)\
**Post date:** [September 11, 2019, 1:58am UTC](https://talk.jekyllrb.com/t/where-does-the-universal-embed-code-go/3340/1 "2019-09-11T01:58:04Z")

</div>

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

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

* * *

Quora:  
[https://www.quora.com/unanswered/Where-does-the-Universal-Embed-Code-go-for-Disqus-and-Jekyll](https://www.quora.com/unanswered/Where-does-the-Universal-Embed-Code-go-for-Disqus-and-Jekyll)

* * *

> <https://stackoverflow.com/questions/57881099/where-does-the-universal-embed-code-go-for-disqus-and-jekyll>

---

<div class="post-metadata">

**Author:** ![mmistakes](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/mmistakes/32/2169_2.png) [@mmistakes](https://talk.jekyllrb.com/u/mmistakes)\
**Post date:** [September 11, 2019, 3:01am UTC](https://talk.jekyllrb.com/t/where-does-the-universal-embed-code-go/3340/2 "2019-09-11T03:01:49Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Pinocchio](https://avatars.discourse-cdn.com/v4/letter/p/f07891/32.png) [@Pinocchio](https://talk.jekyllrb.com/u/Pinocchio)\
**Post date:** [September 11, 2019, 3:02am UTC](https://talk.jekyllrb.com/t/where-does-the-universal-embed-code-go/3340/3 "2019-09-11T03:02:39Z")

</div>

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](https://www.youtube.com/watch?v=bDQsGdCWv4I) right now.

---

<div class="post-metadata">

**Author:** ![Pinocchio](https://avatars.discourse-cdn.com/v4/letter/p/f07891/32.png) [@Pinocchio](https://talk.jekyllrb.com/u/Pinocchio)\
**Post date:** [September 11, 2019, 3:03am UTC](https://talk.jekyllrb.com/t/where-does-the-universal-embed-code-go/3340/4 "2019-09-11T03:03:41Z")

</div>

I discovered these instructions: [Disqus comments setup for Jekyll](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.

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

```

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

---

<div class="post-metadata">

**Author:** ![Pinocchio](https://avatars.discourse-cdn.com/v4/letter/p/f07891/32.png) [@Pinocchio](https://talk.jekyllrb.com/u/Pinocchio)\
**Post date:** [September 11, 2019, 3:04am UTC](https://talk.jekyllrb.com/t/where-does-the-universal-embed-code-go/3340/5 "2019-09-11T03:04:33Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![mmistakes](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/mmistakes/32/2169_2.png) [@mmistakes](https://talk.jekyllrb.com/u/mmistakes)\
**Post date:** [September 11, 2019, 3:16am UTC](https://talk.jekyllrb.com/t/where-does-the-universal-embed-code-go/3340/6 "2019-09-11T03:16:10Z")

</div>

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

> **[Themes](https://jekyllrb.com/docs/themes/)**
>
> Jekyll has an extensive theme system that allows you to leverage community-maintained templates and styles to customize your site’s presentation. Jekyll themes specify plugins and package up assets, layouts, includes, and stylesheets in a way that...

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.

---

<div class="post-metadata">

**Author:** ![Pinocchio](https://avatars.discourse-cdn.com/v4/letter/p/f07891/32.png) [@Pinocchio](https://talk.jekyllrb.com/u/Pinocchio)\
**Post date:** [September 11, 2019, 4:01am UTC](https://talk.jekyllrb.com/t/where-does-the-universal-embed-code-go/3340/7 "2019-09-11T04:01:05Z")

</div>

can you just post an example?

Is this enough?

```auto
<html>

<article>
   {{ content }}
</article>
{% if site.disqus.shortname %}
  {% include disqus_comments.html %}
{% endif %}
</html>

```

---

<div class="post-metadata">

**Author:** ![rdyar](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/rdyar/32/710_2.png) [@rdyar](https://talk.jekyllrb.com/u/rdyar)\
**Post date:** [September 11, 2019, 5:05am UTC](https://talk.jekyllrb.com/t/where-does-the-universal-embed-code-go/3340/8 "2019-09-11T05:05:36Z")

</div>

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:

```auto
disqus:
    shortname: my_disqus_shortname

```

[https://github.com/jekyll/minima#enabling-comments-via-disqus](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.

---

<div class="post-metadata">

**Author:** ![Pinocchio](https://avatars.discourse-cdn.com/v4/letter/p/f07891/32.png) [@Pinocchio](https://talk.jekyllrb.com/u/Pinocchio)\
**Post date:** [October 2, 2019, 12:27am UTC](https://talk.jekyllrb.com/t/where-does-the-universal-embed-code-go/3340/9 "2019-10-02T00:27:32Z")

</div>

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

```auto
disqus:
    shortname: my_disqus_shortname

```

---

<div class="post-metadata">

**Author:** ![Pinocchio](https://avatars.discourse-cdn.com/v4/letter/p/f07891/32.png) [@Pinocchio](https://talk.jekyllrb.com/u/Pinocchio)\
**Post date:** [October 2, 2019, 12:28am UTC](https://talk.jekyllrb.com/t/where-does-the-universal-embed-code-go/3340/10 "2019-10-02T00:28:06Z")

</div>

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

1. Any theme
2. minima theme

?

---

<div class="post-metadata">

**Author:** ![rdyar](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/rdyar/32/710_2.png) [@rdyar](https://talk.jekyllrb.com/u/rdyar)\
**Post date:** [October 2, 2019, 2:16am UTC](https://talk.jekyllrb.com/t/where-does-the-universal-embed-code-go/3340/11 "2019-10-02T02:16:43Z")

</div>

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.
