Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use this without theme #15

Closed
pjebs opened this issue Jan 19, 2019 · 3 comments
Closed

Use this without theme #15

pjebs opened this issue Jan 19, 2019 · 3 comments

Comments

@pjebs
Copy link

pjebs commented Jan 19, 2019

Is there anyway to use this theme for a particular "section" only and have a different theme for the rest of the site?

It would be awesome if instructions were added to readme despite it being an unorthodox case.

@alex-shpak
Copy link
Owner

Hi!
Unfortunately there is no way in hugo to apply multiple themes.
Though, Book theme is designed to render docs and posts sections only, leaving user to render other pages, so your case sounds possible to do.

Hugo theme file structure is the same as in root of project. So if you copy one theme into ~/my-hugo-project and another into ~/my-hugo-project/themes/name it supposed to work, maybe with minor tweaks.

Steps would be something like this:

  • Create new hugo project
  • add Theme-1 to themes/theme-1
  • copy static, assets, layouts from Theme-2 into project root
  • run site with Theme-1

In this case Theme 2 will have higher priority in rendering
But then it will be up to you to manually update Theme 2 sometimes

It's up to you to decide to use Book theme as Theme 1 or *Theme 2, depending on complexity of other theme.

I hope it makes sense or helps you.

P.S. I'm not sure that is good idea to put it into README, but it will be searchable from now.

@alex-shpak
Copy link
Owner

Feel free to reopen if you need some more assistance.
Closing for now.

@pjebs
Copy link
Author

pjebs commented Feb 11, 2019

thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants