๐๏ธ Site structure
There are 4 main folders for Hugo-based sites:
content/
for your Markdown-formatted content files (homepage, etc.)_index.md
the homepage (Hugo requires that the homepage and archive pages have an underscore prefix)
assets/
media/
for your media files (images, videos)icons/custom/
upload any custom SVG icons you want to use
config/_default/
for your site configuration fileshugo.yaml
to configure Hugo (site title, URL, Hugo options, setup per-folder page features)module.yaml
to install or uninstall Hugo themes and pluginsparams.yaml
to configure Hugo Blox options (SEO, analytics, site features)menus.yaml
to configure your menu links (if the menu is enabled inparams.yaml
)languages.yaml
to configure your siteโs language or to set language-specific options in a multilingual site
static/uploads/
for any files you want visitors to download, such as a PDF of your resumehugo-blox/blox/community/
install custom or community blox herego.mod
sets the version of Hugo themes/plugins which your site uses - learn how to update
Hugo File Naming Convention
Hugo gives us two options to name standard page files: as TITLE/index.md
or TITLE.md
where TITLE
is your page name.
The page name should be lowercase and using hyphens (-
) instead of spaces.
Both approaches result in the same output, so you can choose your preferred approach to naming and organizing files. A benefit to the folder-based approach is that all your pageโs files (such as images) are self-contained within the pageโs folder, so itโs more portable if you wish to share the original Markdown page with someone.
The homepage is a special case as Hugo requires the homepage and listing pages to be named _index.md
.