hugo-theme-relearn/exampleSite/content/configuration/siteorganization/structure/_index.en.md
2024-10-11 16:47:18 +02:00

1.7 KiB

+++ description = "Your site's directory structure" title = "Basic Structure" weight = 1 +++

Structure

If you've followed the Getting Started guide, you are resulting in a directory layout similar to this

├── content
│   ├── basics
│   │   ├── first-content
|   |   |   └── _index.md
│   │   ├── second-content
|   |   |   └── _index.md
│   │   └── third-content.md
│   └── _index.md
├── themes
│   └── hugo-theme-relearn
│       └── ...
└── hugo.toml

Hugo creates a union file system, allowing you to mount two or more directories to the same location.

By default, it overlays your root directory on top of the directory of the Relearn theme. Files contained in your root directory will replace files in the Relearn theme's directory of the same location.

For example, the theme defines a file themes/hugo-theme-relearn/layouts/partials/heading.html, you can override it by defining your own file in layouts/partials/heading.html.

This makes it easy to customize the theme without having to edit files inside of the themes directory and so making it easier for you in the future to update the theme to a newer version.

Warning

If you are editing files inside the themes/hugo-theme-relearn directory, you're doing it wrong.

See the above paragraphs.

Warning

If you have cloned the theme repository and start editing files for your site in this clone, you're doing it wrong.

Follow the Getting Started guide.