6

I'm looking to use a static site generator to build a few upcoming websites and was messing around with Jekyll and Hugo. The sites will be custom Bootstrap style designs and not anything from prebuilt themes. After messing around with the two I like the looks of using Hugo.

Anyway, going through their documentation I came across a question. Am I required to create a 'theme' for each of these sites or can I keep everything in the global /layouts, /static, /archetypes, etc folders?

I'm not looking to package these designs up as reusable themes and it just seems like unnecessary convolutions to nest things even deeper as I try and remember the order Hugo prioritizes these template files over others.

2
  • I think it would be simple enough to try this out. If it fails, you just need to move your files into the themes/your-theme folder.
    – Curtis
    Aug 22, 2017 at 10:34
  • That's true and tbh I'm pretty certain it's not required to use one. Thank you @Curt! Aug 23, 2017 at 16:49

1 Answer 1

7

Hugo does not ship with a default theme, so you'd have to either write your own or use a prebuilt one. The Hugo documentation lists the priority in which template files are checked in order to determine how the content is rendered.

The templates located in the global layouts folder takes priority over the ones in themes/<theme name>/layouts.

So based on that, you can in fact put your template files only in the global layouts folder.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.