gitHub Blog 만들기 (chirpy theme)
local setting
create repository
username.github.io
clone
1
git clone https://github.com/[gitHubId]/[gitHubID]-github.io.git
jekyll
1
2
3
4
5
6
cd username.github.io
gem install jekyll bundler #jekyll 설치
# 해당 경로에 .git 빼고 다 삭제
jekyll new ./ #jekyll 생성
bundle install #bundle 설치
bundle exec jekyll serve #로컬서버 실행 #localhost:4000 에서 확인
jekyll theme
jekyll theme 선택
http://jekyllthemes.org/
https://jekyllthemes.io/free
http://themes.jekyllrc.org/
https://github.com/topics/jekyll-theme
fork jekyll theme
- Fork Chirpy
- set Repository name
<gitHub id>.github.io
clone
2. ruby 설치
jekyll installation document
ruby download site
Ruby+Devkt2.6.8-1 (x64)
Start Command Prompt with Ruby 실행
1
2
3
4
5
# 설치 확인
ruby -v
gem -v
gcc -v
cd Github\username.github.io
3. jekyll 설치
git bash 실행
1
2
3
4
gem install jekyll bundler # 로컬에 jekyll 설치
jekyll new ./ # jekyll 생성
bundle install
bundle exec jekyll serve # 로컬에서 실행 확인
오류 발생 시
1 2 3 4 # update rubygem gem update --system # Install the exact Bundler gem install bundler -v "$(grep -A 1 "BUNDLED WITH" Gemfile.lock | tail -n 1)"
Configuration & Deploy
Initialization
1
tools/init.sh # initailization
- 특정 파일과 폴더 삭제
- .travls.yml
- _posts 폴더 속 파일들
- docs 폴더
- .github/workflows/pages-deploy.yml.hook 의 .hook 확장자 삭제
Configuration
_config.yml 파일 수정 .gitignore 파일에 아래 내용 추가
1
Gemfile.lock
Deploy
1
2
3
git add .
git commit -m "[commit message]"
git push
push 할 때, # Actions 에서 The process ‘/opt/hostedtoolcache/Ruby 오류 발생시
bundle lock –add-platform x86_64-linux