Hugo 디렉토리 구조

모듈 설정

기본 생성되는 폴더

[module]
[[module.mounts]]
  source = 'content'
  target = 'content'
[[module.mounts]]
  source = 'static'
  target = 'static'
[[module.mounts]]
  source = 'layouts'
  target = 'layouts'
[[module.mounts]]
  source = 'data'
  target = 'data'
[[module.mounts]]
  source = 'assets'
  target = 'assets'
[[module.mounts]]
  source = 'i18n'
  target = 'i18n'
[[module.mounts]]
  source = 'archetypes'
  target = 'archetypes'
  1. contents

    사이트의 모든 콘텐츠을 의미한다. 최상위 폴더는 섹션으로 간주된다.

  2. static

    모든 정적 콘텐츠(이미지, CSS, JavaScript 등)를 저장합니다. Hugo가 Build할 때 모든 정적 콘텐츠는 그대로 복사됩니다.

  3. layouts

    콘텐츠를 정적사이트로 랜더링되는 방식을 지정하는 템플릿 파일을 .html 형식으로 저장합니다.

  4. data

    동적 콘텐츠에서 가져오는 데이터 템플릿을 만드는데 사용합니다.

  5. assets

    hugo에서 처리되는 파일을 등록합니다. hugo 사이트 생성할 때 기본생성되지 않습니다.

  6. i18n

    다국어 지원을 위한 설정파일을 저장합니다. en.toml, ko.toml

  7. archetypes

    content 생성할 때, 기본 템플릿을 지정할 수 있습니다.

---
title: "{{ replace .Name "-" " " | title }}"
date: {{ .Date }}
draft: true
---