HUGO

Directory Structure for a Hugo Project (the exampleSite dir is just an example)

It has come to my attention that several new users publish their projects by using the replicated directory structure of a theme i.e.:

<theme-name>
├── LICENSE.md
├── README.md
├── archetypes
│   └── default.md
├── assets
├── config.toml
├── exampleSite
│   ├── config.toml
│   ├── content
│   └── static
├── images
├── layouts
├── resources
├── static
└── theme.toml

That is not how a Hugo project should be structured.
The exampleSite directory is not meant to be used for a project’s assets, content and settings.

The structure of a theme requires the exampleSite directory for the theme demo on the Hugo Themes Showcase, also this directory serves as an example of the various config settings that a theme may require.

A Hugo project should be structured under its project root and call its theme from the themesDir.

The command hugo new site <path> offers a good example regarding the structure of a Hugo project:

<project-name>
├── archetypes
│   └── default.md
├── config.toml
├── content
├── data
├── layouts
├── static
└── themes

Also have a look at:

4 Likes

This topic was automatically closed after 5 days. New replies are no longer allowed.