When you build your site, Hugo creates a public directory, and typically a resources directory as well:
│ └── default.md
│ └── _default/
│ └── hugo.toml
├── public/ <-- created when you build your site
├── resources/ <-- created when you build your site
Each of the subdirectories contributes to the content, structure, behavior, or presentation of your site.
The archetypes directory contains templates for new content. See details.
The config directory contains your site configuration, possibly split into multiple subdirectories and files. For projects with minimal configuration or projects that do not need to behave differently in different environments, a single configuration file named hugo.toml in the root of the project is sufficient. See details.
The content directory contains the markup files (typically markdown) and page resources that comprise the content of your site. See details.
The data directory contains data files (JSON, TOML, YAML, or XML) that augment content, configuration, localization, and navigation. See details.
The i18n directory contains translation tables for multilingual sites. See details.
The layouts directory contains templates to transform content, data, and resources into a complete website. See details.
The public directory contains the published website, generated when you run the hugo command. Hugo recreates this directory and its content as needed. See details.
The resources directory contains cached output from Hugo’s asset pipelines, generated when you run the hugo or hugo server commands. By default this cache directory includes CSS and images. Hugo recreates this directory and its content as needed.
The themes directory contains one or more themes, each in its own subdirectory.
Union file system
Hugo creates a union file system, allowing you to mount two or more directories to the same location. For example, let’s say your home directory contains a Hugo project in one directory, and shared content in another:
Using the union file system described above, Hugo mounts each of these directories to the corresponding location in the project. When two files have the same path, the file in the project directory takes precedence. This allows you, for example, to override a theme’s template by placing a copy in the same location within the project directory.
If you are simultaneously using components from two or more themes or modules, and there’s a path collision, the first mount takes precedence.