본문 바로가기

old/Programming

Hugo로 개인 블로그 만드는 법-4.github에 업로드

반응형

목적

윈도우 에서 Hugo로 개인블로그를 만들고 github으로 호스팅하는 법

사용 툴 버전

  • 설치 날짜 : 03-31-2021
  • hugo version : hugo v0.82.0
  • git version : git version 2.31.1.windows.1
  • windows : 10
  • windows terminal: v1.7.572.0
  • Chocolatey : v0.10.15

목차

github에 업로드

github에서 두개의 레파짓토리 생성

  • 1번 레파짓토리: hugo가 올라갈 레파짓토리
  • 2번 레파짓토리: hugo가 렌더링한 html이 올라갈 레파짓토리

2번 레파짓토리는 github에서 호스팅할 싸이트 이므로, 이름을 반드시 username.github.io라고 지어야 합니다.

username.github.io가 개인 블로그 싸이트 이름이 될겁니다.

*싸이트 주소를 못바꾸나요?
깃헙은 무료 호스팅을 해주는 대신 주소변환이 불가능합니다. 다른방법으로 호스팅하는 방법을 찾아봐야 합니다.

터미널을 연후,

git remote add origin [1번 레파짓토리 git주소]
git submodule add -b master [2번 레파짓토리 git주소] public
hugo -D
git add .
git commit -m "test"
git push origin master
cd public
git add .
git commit -m "test"
git push origin master

blackburn을 사용한 제 개인 블로그 예시-github upload

 

eunhanlee/eunhanlee.github.io

Contribute to eunhanlee/eunhanlee.github.io development by creating an account on GitHub.

github.com

git remote add origin https://github.com/eunhanlee/myHugo.git
git submodule add -b master https://github.com/eunhanlee/eunhanlee.github.io.git public
hugo -D
git add .
git commit -m "test"
git push origin master
cd public
git add .
git commit -m "test"
git push origin master
반응형