One theme for homepage, other theme for posts and pages

I’m new to Hugo and I don’t have much experience in HTML/CSS and maybe my question doesn’t have too much sense, but could this be done? I’m really loving the homepage for Forty, but I’m not a fan of their choices for the posts (fonts, spacing, width, lack of floating TOC, dark backround), but on the other hand, Er theme have great, readable posts settings, while maybe a too simplistic homepage. Could I have the best of the both worlds, homepage from Forty and posts (and pages) from Er?

You can use multiple themes. See the example given in

Thanks! I got the part with multiple theme declaration in config.toml

theme = ["my-shortcodes", "base-theme", "hyde"]

but I’m not really sure how to proceed from here, where and how should I specify what theme should it use for homepage and what theme for the rest of the site?

One option is to grab the homepage template you want to use and then paste it under your own layouts folder.

For example, copy:

your-site/themes/some-theme/layouts/index.html

To:

your-site/layouts/index.html

Then when you build your site, that homepage template will be used

1 Like

It’s not working as intended, as I get errors while building and the result is not the expected one. I guess I’ll stick to one theme.

ERROR: 2019/02/21 10:59:00 template.go:142: Unable to render [partials/js.html theme/partials/js.html]
ERROR: 2019/02/21 10:59:00 template.go:143: Expecting to find a template in either the theme/layouts 
or /layouts in one of the following relative locations [partials/js.html theme/partials/js.html]