참고 링크
https://gohugo.io/getting-started/quick-start/
https://aidanbae.github.io/code/hugo/deploytutorial/
이거 보고 따라하면 됨.
Step 1: Install Hugo
brew install hugo
hugo version
Step 2: Create a New Site
hugo new site quickstart (휴고 명령어를 쓸 수 있는 디렉토리. 여기가 git push하는 디렉토리가 아님)
Step 3: Add a Theme
cd quickstart
git init
git submodule add https://github.com/budparr/gohugo-theme-ananke.git themes/ananke
echo 'theme = "ananke"' >> config.toml
Step 4: Add Some Content
hugo new posts/my-first-post.md
# draft는 false로 해주고. hugo로 빌드해준다. quickstart 경로에서.
Step 5: Start the Hugo server
Now, start the Hugo server with drafts enabled:
▶ hugo server -D
Navigate to your new site at http://localhost:1313/.
그냥 hugo server로 하고 draft는 작성시에 false로 하는게편하드라.
Step 6: Customize the Theme
Your new site already looks great, but you will want to tweak it a little before you release it to the public.
baseURL = "https://example.org/"
languageCode = "en-us"
title = "My New Hugo Site"
theme = "ananke"
Step 7: Build static pages
It is simple. Just call:
hugo -D
Output will be in ./public/ directory by default (-d/--destination flag to change it, or set publishdir in the config file).
Drafts do not get deployed; once you finish a post, update the header of the post to say draft: false. More info here.
Step 8: Deploy (https://aidanbae.github.io/code/hugo/deploytutorial/ <- 여기를 참고하세요)
echo 'public/' >> .gitignore
cd public
git init
git remote add origin https://github.com/<USER-NAME>/<USER-NAME>.github.io
git push -u origin master
(당연하지만) push는 public 경로에서
처음 쓸때는 hugo 명령어를 쓸 디렉토리와 / git repository에 푸시해야할 경로가 다르다는 것이 헷갈렸다.
'설정' 카테고리의 다른 글
SSLError(SSLCertVerificationError - windows 파이썬 사용 (0) | 2020.01.31 |
---|---|
pg_hba.conf 개발 서버 설정 (0) | 2020.01.29 |
맥북 공장 초기화 후 (0) | 2020.01.26 |
elasticsearch geo-shape 쿼리 조회 (0) | 2019.11.20 |
postgresql 9.4 conf location (0) | 2019.10.25 |