How To Make Hugo and Firebase Host

How To Make Hugo and Firebase Host

arammoon
Veritas Liberabit Vos, Tech Blog

Hugo와 Firebase를 이용하여 웹사이트 만들기 입니다.

Hugo란?

hugo logo markdown기반 정적 웹엔진

Homepage: Hugo Home page 참고

맥일경우 설치 방법

$ brew install hugo

Theme 설치하기

  1. themes 폴더에 git 또는 수동으로 받아서 복사함
  2. themes내의 config.toml 파일을 root에 복사함
  3. themes별로 config.toml설정 방법을 확인한다
  4. 이사이트의 경우에는 hugo-nuo를 사용했다.

문서 생성 및 편집

hugo new [markdonw].md 로 문서를 생성한다. contents내에 생성됨 폴더로 구분하고 tags를 사용해서 문서를 분리한다.

Firebase 설치

$ npm install -g firebase-tools

Firebase 설정

$ firebase init

hugo site 생성

$ hugo
public 폴더에 파일이 생성된다

사이트 퍼블리싱

$ firebase deploy

두개를 한꺼번에 해도 된다

$ hugo && firebase deploy

Test

$ hugo server -w
-w option: 서버를 재시작하지 않아도 자동 적용

$ hugo serve -w -D
-D draft = true인 포스팅까지 랜더링 해줌

참고한 site

Hugo 설치하기
[Hugo + Firebase: How to create your own static website for free in minutes(영문)] (https://medium.freecodecamp.org/hugo-firebase-how-to-create-your-own-dynamic-website-for-free-in-minutes-463b4fb7bf5a)

Veritas Liberabit Vos