Home > Mobile >  Where do I paste Utterances <script> tag in Jekyll Minima theme?
Where do I paste Utterances <script> tag in Jekyll Minima theme?

Time:06-09

I want to add comments on my Jekyll website with Utterances. I use Minima theme, so I don't have _layout/post.html.

I copied

<script src="https://utteranc.es/client.js"
        repo="sanchoi0310/comments"
        issue-term="pathname"
        theme="github-light"
        crossorigin="anonymous"
        async>
</script>

I thought I had to paste it in _site/intex.html, but the comment window was not there and my <script> tag was automatically deleted.

Where do I paste Utterances <script> tag in Jekyll Minima theme?

CodePudding user response:

Paste the code in the Default layout file. Also, you can create a layout for your page in _layouts file

<script src="https://utteranc.es/client.js"
        repo="sanchoi0310/comments"
        issue-term="pathname"
        theme="github-light"
        crossorigin="anonymous"
        async>
</script>

  • Related