기타

깃 블로그 생성

joje* 2023. 5. 13. 17:50
C:\['로컬 레포지토리 경로']>bundle install

깃 허브를 이용해 블로그 생성

- 기본적으로 숙지해야 할 정보

1. github.io는 깃허브에서 제공하는 무료 호스팅 도메인으로, 깃허브에 가입되어 있다면 누구나  https://(github 아이디).github.io주소를 가진 페이지를 지닐 수 있다.

2. Jekyll은 Ruby 언어로 만들어진 '정적 사이트 생성기'이다.Markdowm 문법으로 작성된 문서를 HTML로 변환해 웹 사이트를 구축할 수 있도록 도와준다.

 

- 깃 블로그 원하는 무료 테마를 이용해 생성하는 방법

1. 아래 사이트들을 참조해 원하는 깃 블로그 Jekyll 무료 테마를 검색해 찾아준다.

-https://github.com/topics/jekyll-theme

 

GitHub: Let’s build from here

GitHub is where over 100 million developers shape the future of software, together. Contribute to the open source community, manage your Git repositories, review code like a pro, track bugs and fea...

github.com

-https://jekyllthemes.io/free

 

Free Jekyll Themes

A curated directory of the best free Jekyll themes for your blog or website.

jekyllthemes.io

-http://jekyllthemes.org/

 

Jekyll Themes

 

jekyllthemes.org

2. 선택한 깃 블로그의 깃 허브에 들어가 테마와 관련된 소스코드를 fork하여 자신의 깃 허브로 소스코드를 복사해준다.

 

3. 복사된 깃 허브 repository의 setting에서 repository 이름을 (github 아이디).github.io로 변경해준 후, Pages 메뉴에 들어가 배포 빌드 설정을 Deploy from a branch로 맞춰주고, branch를 설정한다.

 

4. 깃 혹은 소스트리와 같은 UI를 이용해 원격 repository의 소스코드를 로컬로 clone 해준다.

 

5. 블로그 내용 수정을 위해  Jekyll과 Ruby를 설치해 필요한 패키지들을 다운하고, 설정을 맞춰준다.

** 내용 참조: https://theorydb.github.io/envops/2019/05/03/envops-blog-github-pages-jekyll/

 

[Jekyll Blog] GitHub 연동 및 Jekyll 설치

개요 앞서 선정한 테마를 GitHub에 연동하고 Jekyll을 설치하여 웹브라우저에 직접 블로그를 띄워봅시다. 목차 GitHub 회원가입 및 Fork Git 설치 및 Clone Ruby & Jekyll 설치 Jekyll 디렉토리 구조 파일 수정

theorydb.github.io

** 블로그 자체 개발을 위해 fork를 받으며 설정되어 있던 설정값들을 삭제하고 초기화하는

jekyll new ['깃허브 아이디'].github.io

명령어 실행 시  (Bundler::GemNotFound) 에러가 발생했다. bundle 파일 버전때문에 생기는 문제이므로, 아래의 명령어를 통해 bundle 파일 업데이트 후 재설치를 해준다.

C:\['로컬 레포지토리 경로']>bundle update

Bundle updated!라는 명령어 확인 후

C:\['로컬 레포지토리 경로']>bundle install

설치가 완료되면,

jekyll new ['깃허브 아이디'].github.io

재실행

 

6. Jekyll 서버 구동 후, Server address 항목의 주소를 복사해 브라우저 주소창에 넣고 접속하면 복사해온 테마의 블로그 창이  뜨는 걸 확인할 수 있다.

 

7.블로그 편집을 위한 기타 설정값들을 맞춰준다.

- 내용참고: https://theorydb.github.io/envops/2019/05/03/envops-blog-github-pages-jekyll/