๐ฅ [Jekyll] giscus ๋ฅผ ๋ธ๋ก๊ทธ์ ์ ์ฉํ๊ธฐ
๋น๊ต
์ฐ๋ฆฌ ๋ํ ๋ฆฌ ์ฒ ๋ธ๋ก๊ทธ์๋ ๋๊ธ ๊ธฐ๋ฅ์ ์ถ๊ฐํ๊ณ ์ถ์๋ค.
์ข ๋ฅ๋ ์๊ฐ๋ณด๋ค ๋ค์ํ๋๋ฐ,
utterances
, disqus
, giscus
์ด๋ ๊ฒ ์ธ๊ฐ์ง๋ฅผ ์์ฃผ ์ฐ๋ ๊ฒ ๊ฐ์๋ค.
ํ์ง๋ง ๊ทธ ๋๋ฌธ์ ๋ ๊ณ ๋ฏผ์ ๋น ์ง๊ฒ ๋๋ค.
๋ง์ ๊ณ ๋ฏผ ๋์ disqus
, giscus
๋ก ์ถ๋ ธ๋ค. ์ด ๋์ github
๊ธฐ๋ฐ์ผ๋ก ์๋ํ๋ค๊ณ ํ๊ธฐ ๋๋ฌธ
ํ์ง๋ง
disqus
๋ issue
๊ธฐ๋ฐ์ผ๋ก ๊ด๋ฆฌํ๊ณ
giscus
๋ discussion
์ ์ฌ์ฉํ๋ค๋ ๋ง์ ๋ฃ๊ณ
๋๊ธ์ด issue
์๋ ๋ง์ง ์๋๋ค ํ๋จํ์ฌ giscus
๋ฅผ ์ ํํ๋ค.
์ ์ฉ๋ฐฉ๋ฒ
1. giscus ์ค์น
(๋ด๊ฐ ์ฌ์ฉํ repo ์ giscus ๋ฅผ ์ค์น๋ฅผ ํ๋ค)
2. Repo ๋ด discussion ์์ฑ
(Repo > Setting > ํ๋จ > discussion Click)
3. Repo > Discussions
(new discussion ์ ํด๋ฆญํ๋ค.)
(์๋ก์ด ์นดํ
๊ณ ๋ฆฌ๋ฅผ ์์ฑ)
(Comments ๋ผ๊ณ ์์ฑ ํ Announcement ๋ก ์ค์ ํ ์ ์ฅ)
4. giscus ์ค์ ํ๊ธฐ
๋จผ์ giscus ์ฑ ๋ฌธ์ ๋ก ์ด๋ ํด์ค๋ค.
์ ์ฅ์๋ฅผ ์ฌ์ฉํ repo ๋ช ์ ์ ๋ ฅํด ์ค ํ
(๋ฐฉ๊ธ ์์ฑํ Comments ๋ฅผ ์ ์ฉ ์์ผ์ค๋ค.)
ํ๋จ์ ๋์ค๋ script-tag
๋ฅผ ๋ณต์ฌํด์ค๋ค.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
<script src="https://giscus.app/client.js"
data-repo="[ENTER REPO HERE]"
data-repo-id="[ENTER REPO ID HERE]"
data-category="[ENTER CATEGORY NAME HERE]"
data-category-id="[ENTER CATEGORY ID HERE]"
data-mapping="pathname"
data-strict="0"
data-reactions-enabled="1"
data-emit-metadata="0"
data-input-position="bottom"
data-theme="dark"
data-lang="ko"
crossorigin="anonymous"
async>
</script>
5. Jekyll ์ ์ค์ ๋ถ์ฌํ๊ธฐ
_config.xml
์ผ๋ก ์ด๋ ํ ํ
1
2
3
4
5
6
7
8
9
10
comments:
active: giscus
# ์ค๋ต
giscus:
repo: # ์ฌ์ฉํ ๋ ํฌ ๋ช
repo_id: # ๋ณต์ฌํด ์๋ script ๋ด repo_id
category: # script ๋ด category ๊ฐ ์
๋ ฅ
category_id: # script ๋ด category_id ๊ณ ์ ๊ฐ ์
๋ ฅ
6. Dark / Light mode Theme ๋ถ์ฌํ๊ธฐ
(_includes > comments > giscus.html ๋ก ์ด๋ํ๋ค)
1
2
3
4
5
6
7
8
9
10
<!-- https://giscus.app/ -->
<script type="text/javascript">
(function () {
const origin = 'https://giscus.app';
const iframe = 'iframe.giscus-frame';
const lightTheme = 'light_protanopia';
const darkTheme = 'noborder_dark';
let initTheme = lightTheme;
const html = document.documentElement;
ํด๋น ํ๊ทธ ๋ด lightTheme
๊ณผ darkTheme
์ ์ ์ ๋ฐฉ๋ฌธํ๋ giscus ์ฑ ๋ฌธ์
์์์ ์ฌ์ฉํ๊ณ ์ถ์ Theme
์ ์ ์ฉํด์ค๋ค.
(์์ฃผ ์ด์๊ฒ ์ ์ ์ฉ ๋๋ค.)
๋ง์น๋ฉฐ
์๋ฌด๋ฆฌ ์ ๋ง๋ ๋ธ๋ก๊ทธ์ฌ๋ ๋๊ธ ๊ธฐ๋ฅ์ด ์์ผ๋ฉด ๊ทธ์ ๋ฉ๋ชจ ์์ฑ์ ๋ถ๊ณผํ ๊ฒ ๊ฐ์ ์์ํ๋๋ฐ,
์๊ฐ๋ณด๋ค ๊ฒฐ๊ณผ๋ฌผ์ด ์๋์จ ๊ฒ ๊ฐ๊ณ ๊ฐ๋จํด์ ๋๋๋ค.
๋์ฑ๊ณต ๋๋ง์กฑ