๐งช ํ ์คํธ ํ๊ฒฝ
์๋ ๋ช
๋ น์ด๋ฅผ ํตํด gatsby-starter-rundevelrun
ํ
ํ๋ฆฟ์ ์ด์ฉํ๋ ์ฌ๋์ ๊ฒฝ์ฐ๊ฑฐ๋ ๋ธ๋ก๊ทธ์ ๋๊ธ์ github
๋ฅผ ํตํด ๋ง๋ค๊ณ ์ถ์ ๊ฒฝ์ฐ ์ฐธ๊ณ ๋ง ํ๋ฉด ๋๋ค.
gatsby new your-blog-name https://github.com/rundevelrun/gatsby-starter-rundevelrun.git
๐ณ giscus๊ฐ ๋ฌด์์ธ๊ฐ?
giscus๋ github repository
์ Discussion
์ ํตํด ๋๊ธ ๊ธฐ๋ฅ์ ๋ง๋ค์ด์ฃผ๋ ํธ๋ฆฌํ ๋ผ์ด๋ธ๋ฌ๋ฆฌ์
๋๋ค.
๊ฐ๋ฐ์๋ github repository
์์ Discussion
๊ธฐ๋ฅ์ ์ด์ด๋๊ณ , giscus ํํ์ด์ง์์ github repository
์ฃผ์์ ์ฌ๋ฌ ์ค์ ์ ์ถ๊ฐํ๋ฉด giscus ์ ๋ณด๋ฅผ ๋ฐ์ ์ ์์ต๋๋ค.
โ giscus ์ค์ ๋ฐฉ๋ฒ
- ๋๊ธ ๋ฐ์ดํฐ๋ฅผ ๋ด์๋
repository
์ ์ ์ํ๋ค.public repository
์ธ์ง ํ์ธํ๋ค.- giscus ์ค์น ํ์ด์ง ์ ์ํ์ฌ giscus๋ฅผ ์ค์นํ๋ค.
repository settings
๋ก ๋ค์ด๊ฐ์Features
์ ์๋Discussions
์ฒดํฌ๋ฐ์ค์ ์ฒดํฌํ๋ค.
- giscus ํํ์ด์ง ์ ์ํ์ฌ ์ค์ ํ๋ค.
- ์ ์ฅ์ ๋ช ์ ์ ๋ ฅํ๋ค.
- Discussions ์ฐ๊ฒฐ ๋ฐฉ๋ฒ์ ์ ํํ๋ค.
- Discuussion ์นดํ ๊ณ ๋ฆฌ๋ฅผ ์ ํํ๋ค. (Announcements๋ฅผ ๊ถ์ฅํฉ๋๋ค.)
- ์ํ๋ ํ
๋ง์ ๊ธฐ๋ฅ์ ์ค์ ํ๊ณ ,
giscus script
๋ฅผ ๋ณต์ฌํ๋ค.
//์์ <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="preferred_color_scheme" data-lang="ko" crossorigin="anonymous" async ></script>
โ ๊ฐ์ธ ๋ธ๋ก๊ทธ์์ giscus ์ปดํฌ๋ํธ ๋ง๋ค์ด์ ์ฌ์ฉํ๊ธฐ
-
giscus ๋ผ์ด๋ธ๋ฌ๋ฆฌ ์ค์น
npm i giscus
-
์ปดํฌ๋ํธ ์์ฑ
giscus script
์์ ๋ฐ์ ๋ฐ์ดํฐ๋ฅผ ์ปดํฌ๋ํธ์ ๋ฃ์ด์ ์ฌ์ฉํ๋ฉด ์์ฑ!import Giscus from '@giscus/react'; export default function MyApp() { return ( <Giscus id="comments" repo="[ENTER REPO HERE]" repoId="[ENTER REPO ID HERE]" category="[ENTER CATEGORY NAME HERE]" categoryId="[ENTER CATEGORY ID HERE]" mapping="pathname" term="Welcome to @giscus/react component!" reactionsEnabled="1" emitMetadata="0" inputPosition="bottom" theme="light" lang="ko" loading="lazy" /> ); }
giscus Github ์ฃผ์ ์ฐธ๊ณ ํ์์ต๋๋ค.
โ rundevelrun/gatsby-starter-rundevelrun ํ ํ๋ฆฟ ์ ์ฉ ์ค์
blog-config.js
์ ๋ด์ฉ ์์
module.exports = {
...
links: {
...
},
giscus: {
repo="[ENTER REPO HERE]"
repoId="[ENTER REPO ID HERE]"
category="[ENTER CATEGORY NAME HERE]"
categoryId="[ENTER CATEGORY ID HERE]"
mapping="pathname"
strict="0"
reactionsEnabled: '1',
inputPosition="bottom"
lang: 'ko',
},
adsense: {
...
}
}