Hugo + Docsy + GitHub Pages로 배포하기 (삽질 메모)

Docsy 모듈, 다국어 경로(/en/), GitHub Actions 배포, 그리고 자주 터지는 함정 해결책

이 글은 내가 Docsy 테마로 블로그/문서 사이트를 만들고 GitHub Pages에 배포하면서 겪은 포인트를 정리한 것이다.

0) 전제 요약

  • Hugo extended 버전(※ SCSS 처리)과 Node + PostCSS(autoprefixer, postcss, postcss-cli) 가 필요하다.
  • Docsy는 Hugo Module로 불러온다: hugo mod init …, hugo mod get github.com/google/docsy, 그리고 hugo.toml[[module.imports]].

1) 기본 설정 (다국어 /en/ 사용)

hugo.toml의 최소값:

baseURL = "https://<user>.github.io/"
title = "My Docsy Site"

defaultContentLanguage = "en"
defaultContentLanguageInSubdir = true

[module]
  [[module.imports]]
    path = "github.com/google/docsy"