přidat giscus

This commit is contained in:
Matyáš Caras 2022-10-22 15:33:15 +02:00
parent 2f34f23b4a
commit 1bd56aba5c
2 changed files with 17 additions and 15 deletions

View file

@ -1,15 +1,19 @@
<div id="gitment_thread"></div> <div id="gitment_thread" class="giscus"></div>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/theme-next/theme-next-gitment@1/default.css"/> <link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/theme-next/theme-next-gitment@1/default.css"/>
<script src="https://cdn.jsdelivr.net/gh/theme-next/theme-next-gitment@1/gitment.browser.js"></script> <script src="https://cdn.jsdelivr.net/gh/theme-next/theme-next-gitment@1/gitment.browser.js"></script>
<script> <script src="https://giscus.app/client.js"
var gitment = new Gitment({ data-repo="hernikplays/blog"
id: '{{ page.id }}', data-repo-id="R_kgDOHr2B6w"
owner: '{{ site.gitment.username }}', data-category="General"
repo: '{{ site.gitment.repo }}', data-category-id="DIC_kwDOHr2B684CSIhA"
oauth: { data-mapping="pathname"
client_id: '{{ site.gitment.client_id }}', data-strict="0"
client_secret: '{{ site.gitment.client_secret }}', data-reactions-enabled="1"
}, data-emit-metadata="0"
}); data-input-position="top"
gitment.render('gitment_thread') data-theme="dark"
</script> data-lang="en"
data-loading="lazy"
crossorigin="anonymous"
async>
</script>

View file

@ -65,9 +65,7 @@ sidebar:
{%- include extensions/comments/disqus.html -%} {%- include extensions/comments/disqus.html -%}
{%- endif -%} {%- endif -%}
{%- if site.gitment.username -%}
{%- include extensions/comments/gitment.html -%} {%- include extensions/comments/gitment.html -%}
{%- endif -%}
{%- if site.utterances.repo -%} {%- if site.utterances.repo -%}
{%- include extensions/comments/utterances.html -%} {%- include extensions/comments/utterances.html -%}