Directory Structure
Scaffolds a project directory structure and takes a single directory and uses it as the input to create a website.
hugo new site creates:
example/
├── archetypes/
│ └── default.md
├── assets/
├── content/
├── data/
├── layouts/
├── public/
├── static/
├── themes/
└── config.toml
archetypes
hugo creates new content files with date
, title
, and draft = true
frontmatter.
assets
All the files which need to be processed by Hugo Pipes.
Files whose .Permalink
or .RelPermalink
are used are published in publish directory.
config
Stores configuration directives as JSON, YAML or TOML.
A single config.toml
at the project root can be used if desired.
content
Sites content (like blog, articles, tutorials) is broken up into subdirectories under /content
.
These sections assign default content types.
data
Configuration files that are used to generate a website in YAML, JSON or TOML format.
Also contains data templates that pull from dynamic content.
layouts
Templates as .html
files for views of content. Includes list pages, homepage, taxonomy templates, partials, single page templates, others.
static
Images, CSS, JavaScript. Assets in /static
are copied over as-is when hugo builds the site.
resources
Stores caches of some files to speed up generation.
public
Directory structure:
public/
├── categories/
│ ├── index.html
│ └── index.xml <-- RSS feed for this section
├── post/
│ ├── my-first-post/
│ │ └── index.html
│ ├── index.html
│ └── index.xml <-- RSS feed for this section
├── tags/
│ ├── index.html
│ └── index.xml <-- RSS feed for this section
├── index.html
├── index.xml <-- RSS feed for the site
└── sitemap.xml