hugo-theme-relearn/exampleSite/content/configuration/sitemanagement/structure/_index.en.md

39 lines
1.6 KiB
Markdown
Raw Permalink Normal View History

2024-10-07 13:30:53 +00:00
+++
2024-10-12 17:28:28 +00:00
categories = ["explanation"]
2024-10-07 13:30:53 +00:00
description = "Your site's directory structure"
2024-10-11 14:27:13 +00:00
title = "Directory Structure"
2024-10-07 13:30:53 +00:00
weight = 1
+++
If you've followed the [Getting Started](introduction/quickstart) guide, your directory layout will look similar to this:
````plaintext
├── content
│ ├── first-chapter
│ │ ├── first-page
2024-10-07 13:30:53 +00:00
| | | └── _index.md
│ │ ├── second-page
| | | └── index.md
│ │ └── third-page.md
2024-10-07 13:30:53 +00:00
│ └── _index.md
├── themes
│ └── hugo-theme-relearn
│ └── ...
└── hugo.toml
````
Hugo uses a [union file system](https://gohugo.io/getting-started/directory-structure/#union-file-system), which lets you combine multiple directories.
By default, it puts your root directory on top of the Relearn theme directory. Files in your root directory will replace theme files in the same location.
For example, if you create a file at `layouts/partials/heading.html`, it will override the theme's `themes/hugo-theme-relearn/layouts/partials/heading.html`.
[See this list](configuration/customization/partials), to learn which files are allowed to be modified by you.
2024-10-07 13:30:53 +00:00
This makes it easy to customize the theme without changing files in the `themes` directory, making future theme updates simpler.
> [!WARNING]
> Don't edit files inside the `themes/hugo-theme-relearn` directory. That's not the recommended way to customize! Refer to the explanation above.
>
> Don't clone the theme repository and edit files there for your site. That's not the recommended way to customize! Instead, follow the [Getting Started](introduction/quickstart) guide.