I am fairly new to Hugo and I am currently working on customizing a theme for my website. I’ve been able to make some changes using the documentation, but I’m struggling with customizing the layout of certain pages. Specifically, I want to adjust the layout of the single post page and the homepage.
For the single post page, I want to rearrange the elements and possibly add some new ones. I’ve looked through the theme’s layouts folder, but I am not sure which file I need to edit to make these changes.
Similarly, for the homepage, I want to change the order of the posts and maybe add a sidebar with some additional information.
Single pages are rendered by themes/beautifulhugo/layouts/_default/single.html
The home page is rendered by themes/beautifulhugo/layouts/index.html
Both page kinds are wrapped by themes/beautifulhugo/layouts/_default/baseof.html.
To override these templates, create a template with the same path in the layouts directory in the root of your project. For example, to override themes/beautifulhugo/layouts/_default/single.html, create layouts/_default/single.html.
Do not edit files within the themes directory.
I suggest you experiment with the templates described above, then come back here with specific questions.
The last time I visited the Hugo docs there was a page that described how to customize a theme by overriding templates. Unfortunately, I cannot find it anymore - it looks like it’s gone
When searching the web for it, I found it on another domain that hosts an older version of the docs: Hugo | Customize a Theme
Does anyone know why this is no longer part of the current docs?