I understand how themes work, but why not directly use the theme in my main folder website instead of having it the ‘theme’ file? Do you see my point?
Because having the theme in the theme folder make tougher to change CSS or config instead of modifying directly the theme!
Thank in advance
Because this is the way themes works and the way hugo is organized.
Putting a “theme” in a “themes” folder seems quite a good idea at the time I guess.
Like putting “data” in “data” folder or “css” in “css” folder.
If I follow your question, not why not put all the file on the same root level ? Should be easier ??
And one (of the numerous) brilliant ideas behing hugo is the lookup order. You can override whatever you want easily without changing an original theme and he can be updated on his own cycle.
If you want update the theme directly this is also possible. Going in one subfolder or an other makes no difference at all.
Thank you for your answer! I’m new to Hugo (I’m from jekyll…). So sometimes I still have issues on the way I overwrite the theme (not working or take me too much time) so that’s why I was wondering why not working directly on the theme itself (especially when you only need one theme for your website!). And also, why would I want to update the theme (may cause bugs or issues)?
But I see your point, it makes more sens for me now! So thanks !
Yes. Just see it like inheritance (or acquisition in Zope).
A theme (if not your own) will evolve. So surcharging some partials/shortcode/logic allows you to keep in touch with the theme’s cycle of life, and your own goals/needs/changes.
Hugo is just brilliant on that side.
And since some time you can use several themes/modules. Very convenient .