Jekyll에서 Hugo로의 변경
계기
Jekyll로 업로드시 빌드가 느리고 반영 안되는 부분이 많음.
Settings
Hugo 설치
- Hugo Latest Release 다운로드
- C:\Hugo\bin에 압축해제
- 환경변수 PATH에 위 경로 추가
- 다른 폴더상에서 hugo version을 입력하여 등록 여부 확인
Blog 생성
- 테마 선택 https://themes.gohugo.io/
- 생성하고자 하는 폴더에서 $hugo new site name
- 테마 폴더로 이동 $cd theme
- 클론 $git clone github 주소
- config.toml 파일 수정
- 새글 작성 $hugo new /post/파일.md
- 로컬에서 확인 $hugo server -D
- 브라우저 접속 http://localhost:1313/
GitHub
- git init
- git remote add origin 첫번째 repository url
- git submodule add -b master 첫번째 repository url public
- hugo -t 테마이름
- 빌드된 결과 먼저 push 하고 전체를 한번더 push
$ cd public $ git add . $ git commit -m "<커밋 메세지>" $ git push origin master $ cd .. $ git add . $ git commit -m "<커밋 메세지>" $ git push origin master