Skip to content

Commit

Permalink
Support Giscus
Browse files Browse the repository at this point in the history
  • Loading branch information
toshimaru committed May 8, 2022
1 parent d133394 commit bbda6c3
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
10 changes: 10 additions & 0 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,15 @@ theme: jekyll-theme-classless-simple
header_pages:
- about.md
- view-on-github.md
giscus:
repo: toshimaru/jekyll-theme-classless-simple
repo-id: R_kgDOGifmdQ
category-id: DIC_kwDOGifmdc4CO8Hz
# category: Announcements
# lang: en
# reactions-enabled: 1
# emit-metadata: 0
# input-position: bottom
# theme: light
plugins:
- jekyll-redirect-from
17 changes: 17 additions & 0 deletions _layouts/post.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,21 @@ <h1 class="post-title" itemprop="name headline">{{ page.title | escape }}</h1>
<div class="post-content" itemprop="articleBody">
{{ content }}
</div>

{%- if site.giscus.repo -%}
<script src="https://giscus.app/client.js"
data-repo="{{ site.giscus.repo }}"
data-repo-id="{{ site.giscus.repo-id }}"
data-category="{{ site.giscus.category | default: 'Announcements' }}"
data-category-id="{{ site.giscus.category-id }}"
data-mapping="{{ site.giscus.mapping | default: 'pathname' }}"
data-reactions-enabled="{{ site.giscus.reactions-enabled | default: '1' }}"
data-emit-metadata="{{ site.giscus.emit-metadata | default: '0' }}"
data-input-position="{{ site.giscus.input-position | default: 'bottom' }}"
data-theme="{{ site.giscus.theme | default: 'light' }}"
data-lang="{{ site.giscus.lang | default: 'en' }}"
crossorigin="anonymous"
async>
</script>
{%- endif -%}
</div>

0 comments on commit bbda6c3

Please # to comment.