-
I'd like to create a theme based on Hyas, essentially taking advantage of all the great underlying functionality while applying my own colors/fonts/design/etc. and adding some archetypes and shortcodes. I know that Doks is a theme of Hyas, and so at first I thought it must be importing Hyas using Hugo modules or Node modules, then layering on top of that its own design and functionality additions. But from what I can tell looking at the Doks config files, that's not the case; it seems to just be a fork of Hyas with more things added in. Given that, is there a preferred mode for creating a new theme of Hyas? Does the Node module I would rather build my theme changes on top of Hyas than simply forking it. I don't mind recreating things like the npm commands in the (sub)-theme, and I'm agnostic as to whether my theme would pull in Hyas via Node modules, Hugo modules, or normal Hugo theme inheritance. But assuming you do want Hyas to be themeable, which I assume based on the "themes" section of the Hyas site, how do you suggest someone go about it? |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments 7 replies
-
Get back to you later |
Beta Was this translation helpful? Give feedback.
-
The way Hyas (+ Doks) is currently set up is mainly (+ unfortunately) because of Hugo limitations. For example, Hugo Modules does not support configuration + scripts handling. That's mainly why I'm using npm. And in turn, that's why the Hugo theme inheritance does not work (properly). @hyas/core is indeed Hyas as an npm package, so I'd start from there when building a Hyas based theme — h-enk/hyas-child-theme could be your starting point. BTW, I'm in the process of splitting up certain functionalities like e.g. @hyas/images — see also #312 I'm curious what kind of theme you're going to create? Would be nice to keep us updated in the Discussions! |
Beta Was this translation helpful? Give feedback.
-
Oh nice -- I hadn't seen The theme is for a company site that has its own colors, fonts, etc. so that's the big motivation. It's a little more than a brochure site -- it does have a lot of information, and a blog -- but it's not a "documentation" site. |
Beta Was this translation helpful? Give feedback.
-
I have a follow up question, especially because there has been done some work on Hylas after the last post here. How do I work with custom theme? I would also like to customize the look and feel but want to make use of the hylas base (which looks very nice btw). Can I fork the hyas-themes-starter-bootstrap? How can I configure that this theme is being used with when creating a new project with |
Beta Was this translation helpful? Give feedback.
-
Yes, I changed things a bit. I renamed Also, I dropped So, the new commands are: npm create hyas@latest my-custom-theme -- --template bootstrap-starter-recommended npm create hyas@latest my-custom-theme -- --template default-starter-recommended Or, use the interactive CLI: npm create hyas@latest
You could start with |
Beta Was this translation helpful? Give feedback.
The way Hyas (+ Doks) is currently set up is mainly (+ unfortunately) because of Hugo limitations. For example, Hugo Modules does not support configuration + scripts handling. That's mainly why I'm using npm. And in turn, that's why the Hugo theme inheritance does not work (properly).
@hyas/core is indeed Hyas as an npm package, so I'd start from there when building a Hyas based theme — h-enk/hyas-child-theme could be your starting point.
BTW, I'm in the process of splitting up certain functionalities like e.g. @hyas/images — see also #312
I'm curious what kind of theme you're going to create? Would be nice to keep us updated in the Discussions!