๐ ๋ก์ปฌ ๊ฐ๋ฐ ํ๊ฒฝ ์ค์ ๊ฐ์ด๋
ํ์ ์ฌํญ
๋ก์ปฌ์์ Jekyll์ ์คํํ ๋ GitHub Pages์ ๋์ผํ๊ฒ ์๋ํ๋ ค๋ฉด ๋ค์ ๋ช
๋ น์ด๋ฅผ ์ฌ์ฉํด์ผ ํฉ๋๋ค.
์ค์น
class="highlight">
1
2
3
4
5
6
7
8
9
| # 1. Ruby ์ค์น ํ์ธ
ruby --version
# 2. Bundler ์ค์น (์๋ ๊ฒฝ์ฐ)
gem install bundler
# 3. ์์กด์ฑ ์ค์น
bundle install
์คํ ๋ฐฉ๋ฒ ์ฌ๋ฐ๋ฅธ ์คํ ๋ฐฉ๋ฒ (GitHub Pages์ ๋์ผ) class="highlight"> 1
2
3
| # ํ๋ก์ ํธ ๋ฃจํธ์์ ์คํ
bundle exec jekyll serve --source docs --destination _site
๋๋ ๋ ๊ฐ๋จํ๊ฒ: class="highlight"> 1
2
3
| cd docs
bundle exec jekyll serve
์๋ฒ ์์ ํ ๋ธ๋ผ์ฐ์ ์์ http://localhost:4000 ๋๋ http://127.0.0.1:4000์ผ๋ก ์ ์ํ์ธ์. ๋ฌธ์ ํด๊ฒฐ Remote Theme๊ฐ ์ ์ฉ๋์ง ์๋ ๊ฒฝ์ฐ - ํ๋ฌ๊ทธ์ธ ํ์ธ
_config.yml์ jekyll-remote-theme์ด plugins ๋ชฉ๋ก์ ์๋์ง ํ์ธ bundle list | grep remote ๋ช
๋ น์ด๋ก ํ๋ฌ๊ทธ์ธ ์ค์น ํ์ธ - ๋คํธ์ํฌ ์ฐ๊ฒฐ ํ์ธ
- Remote theme๋ GitHub์์ ํ
๋ง๋ฅผ ๋ค์ด๋ก๋ํด์ผ ํ๋ฏ๋ก ์ธํฐ๋ท ์ฐ๊ฒฐ์ด ํ์ํฉ๋๋ค
- ๋ฐฉํ๋ฒฝ์ด๋ ํ๋ก์ ์ค์ ์ด GitHub API ์ ๊ทผ์ ๋ง๊ณ ์๋์ง ํ์ธ
- ์บ์ ์ญ์
class="highlight"> 1
2
3
4
5
| rm -rf .jekyll-cache
rm -rf _site
bundle exec jekyll clean
bundle exec jekyll serve --source docs
- ํ๋ฌ๊ทธ์ธ ์ฌ์ค์น
class="highlight"> 1
2
3
| bundle update jekyll-remote-theme
bundle exec jekyll serve --source docs
๋น๋ ๋ช
๋ น์ด (GitHub Actions์ ๋์ผ) class="highlight"> 1
2
| bundle exec jekyll build -s docs -d _site
์ถ๊ฐ ํ --incremental ์ต์
์ ์ฌ์ฉํ๋ฉด ๋ณ๊ฒฝ๋ ํ์ผ๋ง ์ฌ๋น๋ํ์ฌ ๋ ๋น ๋ฆ
๋๋ค: class="highlight"> 1
2
| bundle exec jekyll serve --source docs --incremental
--livereload ์ต์
์ ์ฌ์ฉํ๋ฉด ํ์ผ ๋ณ๊ฒฝ ์ ์๋์ผ๋ก ๋ธ๋ผ์ฐ์ ๊ฐ ์๋ก๊ณ ์นจ๋ฉ๋๋ค: class="highlight"> 1
2
| bundle exec jekyll serve --source docs --livereload
|
|
|
|
|
|
|
|