I’m converting an existing single html page site into hugo, and will be using hugo for the remaning project documentation.
What’s the right way to import the existing /index.html file ? Putting it in /static/ just gets overwritten during generation.
I’ve split the index.html into a bunch of partials under my theme/layouts, but I’m not sure how to tell hugo to use the root/index.html instead of the default index.html:
/layouts/index.html is only used for the homepage. If you want to use the same layout in other places, a simple include would work well.
It does look to me like you’re not quite using the themes the way they are intended… I also think this is something that isn’t very clear yet in the docs.
Allow me to explain.
/themes is meant for 3RD PARTY themes. Other than placing them there, they aren’t meant to be touched. This allows for easy future updates.
/themes could also be used when sharing a single layout across many of your own sites. Again you wouldn’t change it in each site, but rather a single external repository.
/layouts is local. It’s meant for either the templates that pertain only to this site, or templates that override the templates in the theme.
The structure of a theme and the structure of /layouts completely mirror each other.
Thanks Steve, I was pretty sure I’m doing this wrong – so I put my custom things into /layouts, cleaned up the theme and it looks great again! If you are ok to check it, same links apply above. Next steps are to link in the hugo doc parts into the overal site.