Skip to content

Commit

Permalink
giscus html 설정
Browse files Browse the repository at this point in the history
  • Loading branch information
chlwlstlf committed Nov 21, 2024
1 parent 07757c2 commit 5e23e64
Showing 1 changed file with 39 additions and 17 deletions.
56 changes: 39 additions & 17 deletions _includes/comments-providers/giscus.html
Original file line number Diff line number Diff line change
@@ -1,17 +1,39 @@
<script
src="https://giscus.app/client.js"
data-repo="chlwlstlf/chlwlstlf.github.io"
data-repo-id="R_kgDOG8MDQA"
data-category="Announcements"
data-category-id="DIC_kwDOG8MDQM4CkeZa"
data-mapping="pathname"
data-strict="0"
data-reactions-enabled="1"
data-emit-metadata="0"
data-input-position="top"
data-theme="preferred_color_scheme"
data-lang="ko"
data-loading="lazy"
crossorigin="anonymous"
async
></script>
<script>
"use strict";

(function () {
var commentContainer = document.querySelector("#giscus-comments");

if (!commentContainer) {
return;
}

var script = document.createElement("script");
script.setAttribute("src", "https://giscus.app/client.js");
script.setAttribute("data-repo", "{{ site.repository | downcase }}");
script.setAttribute("data-repo-id", "{{ site.comments.giscus.repo_id }}");
script.setAttribute(
"data-category",
"{{ site.comments.giscus.category_name }}"
);
script.setAttribute(
"data-category-id",
"{{ site.comments.giscus.category_id }}"
);
script.setAttribute(
"data-mapping",
'{{ site.comments.giscus.discussion_term | default: "pathname" }}'
);
script.setAttribute(
"data-reactions-enabled",
"{{ site.comments.giscus.reactions_enabled | default: 1 }}"
);
script.setAttribute(
"data-theme",
'{{ site.comments.giscus.theme | default: "light" }}'
);
script.setAttribute("crossorigin", "anonymous");

commentContainer.appendChild(script);
})();
</script>

0 comments on commit 5e23e64

Please sign in to comment.