3. Github Blog ์ธํ
๐ ๊นํ๋ธ ๋ธ๋ก๊ทธ ์น ํธ์คํ
1. ๊นํ๋ธ ๋ ํฌ์งํ ๋ฆฌ ์์ฑ
๊นํ๋ธ ์์ด๋๋ง ์์ด๋ ๊ฐ์ธ ๋ธ๋ก๊ทธ๋ฅผ ๋ง๋ค ์ ์๋ค.\
์์ด๋๊ฐ ์๋ค๋ฉด ๋ง๋๋ ๊ฒ์ ์ถ์ฒํ๋ค.
๊นํ๋ธ ๋ก๊ทธ์ธ ํ repository ์์ฑ
์ด๋ฆ์ [์์ด๋].github.io๋ก ์ค์
Public, add README.md ์ฒดํฌ
2. git clone ํ index.html ์์ฑ
๋ด ํฐ๋ฏธ๋์ ๊ฐ์ ธ์์ ์์ ํ๊ธฐ ์ํจ์ด๋ค.
ํฐ๋ฏธ๋์์ git clone [๋ด ๊นํ๋ธ ์ฃผ์]
3. ์๊ฒฉ์ผ๋ก ํธ์คํ ๋๋์ง ํ์ธ
์น ํธ์คํ ์ด ์ ์์ ์ผ๋ก ์ ์ฉ๋๋์ง ํ์ธํ๊ธฐ ์ํด index.html๋ก ํ ์คํธํ๋ค.
cd [๋ด ๊นํ๋ธ ์ฃผ์]
echo "hello world" > index.html
๋ธ๋ผ์ฐ์ ์ [์์ด๋].github.io ์
๋ ฅ
hello world ๋จ๋ฉด ์ฑ๊ณต
4. ๋ ํฌ์ pushํ๊ธฐ
๋ณ๊ฒฝ์ฌํญ์ repository์ ์ ์ฉํ๋ค.
git add .
git commit -m "Initial update"
git push origin main
๐ ์๊ฒฉ ํธ์คํ ์ฌ์ดํธ ๊พธ๋ฏธ๊ธฐ
1. tool ์ค์น
์์ง์ ์๋ฌด๊ฒ๋ ์๋ ํ์ ํ ์ฌ์ดํธ์ด๊ธฐ ๋๋ฌธ์, ๋ค๋ฅธ ์ฌ๋์ด ๋ง๋ ํ ํ๋ฆฟ์ ํ์ฉํด ๊พธ๋ฐ ์์ ์ด๋ค.\
ํ ํ๋ฆฟ์ ์ ์ฉ์ํค๊ธฐ ์ํด์ jekyll๊ณผ bundler๊ฐ ํ์ํ๋ค.
gem install jekyll bundler # jekyll, bundler ์ค์น
jekyll new ./ # jekyll ์ด๊ธฐํ
bundle install
bundle exec jekyll serve
๋ธ๋ผ์ฐ์ ์ localhost:4000์ wjy4ng.github.io ์
๋ ฅ ํ ๋ณ๊ฒฝ๋๋์ง ํ์ธ
์ฑ๊ณตํ๋ฉด git push
โผ๏ธ ํ์๋ jekyll new ./ ์์ ์ค๋ฅ๊ฐ ๋ด๋ค.\
Conflict: /Users/yang-wonjun/git/wjy4ng.github.io exists and is not empty.
Ensure /Users/yang-wonjun/git/wjy4ng.github.io is empty or else try again with --force
to proceed and overwrite any files.
ํด๊ฒฐ ๋ฐฉ๋ฒ\
wjy4ng.github.io ํด๋ ๋ด์ ํ์ผ์ด ์ด๋ฏธ ์์ด์ ๋๋ ์ค๋ฅ์ด๋ค.
ํ์ผ ๋ค ์ญ์ ํ๊ณ jekyll new ./
2. ํ ๋ง ์ ์ฉ
์ฌ์ ์์ ์ ์๋ฃํ๋ค๋ฉด ํ ๋ง๋ฅผ ์ ์ฉ์ํจ๋ค.
์ํ๋ ํ
๋ง Github ๋ค์ด๊ฐ์ Download ZIP
wjy4ng.github.io ํด๋ ์์ ๋ณต๋ถ
bundle install
git์ push
bundle exec jekyll serve ์ฌ์๋
3. ๋ธ๋ก๊ทธ ์ ๋ณด ๋ณ๊ฒฝ
๋ด ๋ธ๋ก๊ทธ์ธ ๋งํผ ์ด๋ฏธ์ง์ ์ค๋ช ์ ์์ ํด์ค๋ค.
_config.yml ์์
lang: ko-KR
timezone: Asia/Seoul
title
tagline
url: "https://wjy4ng.github.io/"
github name
avatar: "/assets/img/profile.img.jpeg"
โผ๏ธ ํ์๋ ์ฌ๊ธฐ์ ์๋ก๊ณ ์นจ์ ํด๋ ์ฌ์ดํธ์ ์ ์ฉ๋์ง ์๋ ์ค๋ฅ๋ฅผ ์ธ์งํ๋ค.
bundle exec jekyll serve ์คํ ์,
Conflict: The following destination is shared by multiple files.
The written file may end up with unexpected contents.
/Users/yang-wonjun/git/wjy4ng.github.io/_site/404.html
- 404.html
- assets/404.html
Conflict: The following destination is shared by multiple files.
The written file may end up with unexpected contents.
/Users/yang-wonjun/git/wjy4ng.github.io/_site/about/index.html
- about.markdown
- /Users/yang-wonjun/git/wjy4ng.github.io/_tabs/about.md
Conflict: The following destination is shared by multiple files.
The written file may end up with unexpected contents.
/Users/yang-wonjun/git/wjy4ng.github.io/_site/index.html
- index.html
- index.markdown
wjy4ng.github.io ํด๋ ๋ด์ 404.html, about.markdown, index.markdown ํ์ผ ์ญ์ ํ๋ฉด ๋๋ค.
โผ๏ธ ์ด ์ธ์๋ avatar ๋ํ ๋ฐ๋์ง ์๋๋ค. ๊ฒฝ๋ก ์ค์ ์ด ์๋ชป๋๊ฑธ๊น..