-
-
Notifications
You must be signed in to change notification settings - Fork 7.6k
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
Consolidate theme.toml and config.toml, add a module config section etc. #5996
Comments
I think that @digitalcraftsman also needs to read this issue. So basically a theme becomes a module. I'm fine with the proposed setup and the backwards compatibility for I suppose that this will change the submission process for Hugo Themes. |
@bep Hm.... now I’m confused... isn’t what you call component1, component2 also each a module, i.e Go modules? It seems that there can only be one config entry of what you now call module. Is that right? |
The names for the variables look fine. Can someone explain to me why the Hence I would expected something like this:
But an extra block for the metadata would not add much value on its own.
The build script for the Hugo theme site would have to be adjusted accordingly, because we have to fetch the required components of the theme as well. Further, it can make the debugging of themes more extensive. We would also loose control of the Hugo theme site to a certain degree. Right now it's a garden with somewhat maintained flowerbeds that fulfill a certain threshold of quality. After a theme submission our small fence around the garden, that protects it, can be overcome. If something goes downhill we eventually notice and fix it, but the garden is already large. If we add support for third-party components that we can't control, we might open our gates a bit to wide - without knowing whether the third-parties, that enter the garden, behave well or not. @onedrawingperday do your see other concerns or larger adjustments that have to be made? |
Probably a bad example from me, but everything outside of the
The script needs to be adjusted, but I suspect it will make it simpler (we will get rid of the 350 submodules). If it for the theme site gets too hard to control random third-party components referenced by path, we can easily put some restrictions, either 1) no components or 2) only vendored components (which will be browsable and part of the theme repo). My main use in this is anyhow not the themes on the themes site, but to make it much simpler for myself and others like me to compose my projects/themes from smaller modules. |
We have already seen third parties who have not behaved well in the garden. I see your point. We cannot blindly trust user input in this case.
I opt for option 1 for now. At least until me and @digitalcraftsman grow familiar with the new way of doing things. Then we can go for option 2. |
@bep Did you see my question above? I’m curios... Isn’t it confusing to call a theme a module and module a component? |
Sounds like a good approach. Option 1 is the easiest one but also the most restrictive. What if a component is essential to a theme and we remain with option 1 (at least for a certain amount of time)? |
Sure. Have I? |
@digitalcraftsman We can set a time frame if you want. A month or two. Then we go for the second option, once we know everything there is to know about Hugo Modules. I doubt that we will see a theme submission that relies on a Hugo (Go) module so soon. We still get themes with Gulp Pipelines and theme authors (that I've written to) were unaware of the fact that they could have done the same with Hugo Pipes. If for some reason you want to go with option 2 right from the start, then we can also do that, although the submission process might take longer (since everything will be new to us also). |
@onedrawingperday Option 1 would be my preferred one. This way we've time to experiment and to adjust our workflow for a submission. |
@bep It seems so to me, but I guess you can explain... |
@bep no Hugo modules for the Themes Site for now. We will let you know me and @digitalcraftsman once we're comfortable with the Hugo Modules workflow, so that the Build Script can be adjusted to allow for Vendored Components. |
@larzza OK, so I may have used those words in "free text" to describe old vs new... My thought was that a
I have certainly gone enough rounds on this to confuse myself from here to Rome. |
@bep Yeah, I understand that... but there can only be one
Or what about this?
|
No, I personally love the |
I personnaly think the
|
I think But I also like |
It has been a while since I took part in this discussion.. back then I was suggesting to add I agree with @regisphilibert that "theme" doesn't apply now as we do a lot more than just tweaking looks of a site. |
I don’t think the word theme has to be interpreted as looks. It can have a broader meaning, for example when talking about a narrative. |
Well, you would agree though that in the web world, it has a very clear meaning. In the end it's all about explaining to people what "this" do. Removing any confusing well known notion from the name seems important. What Bjørn Erik is building is closer to a management for module/component/dependency/plugins/ than an solution for handling your site's theme/skin. |
Yes!
I agree! Which is why, in the context of Hugo, it might be a good idea to keep the theme-name. And also the reason why I spend time on thinking about the matter.
That’s true too. But I still think theme is better than module and component. And that |
Nothing I can do about what you "still" think :)
Yes this also works. |
I think that the following:
Makes the hierarchy pretty explicit i.e. Theme > Component > Module So I agree with @larzza lets keep theme as an umbrella term. |
@onedrawingperday -- the "component1/module1" is a rather constructed hierarchy. I will sleep on it and probably do it my way ... |
Sure. That was just me following the discussion. It's your call. |
I keep liking
Also, I think the initial example is better, with module map including the name rather than relying on |
This commit implements Hugo Modules. This is a broad subject, but some keywords include: * A new `module` configuration section where you can import almost anything. You can configure both your own file mounts nd the file mounts of the modules you import. This is the new recommended way of configuring what you earlier put in `configDir`, `staticDir` etc. And it also allows you to mount folders in non-Hugo-projects, e.g. the `SCSS` folder in the Bootstrap GitHub project. * A module consists of a set of mounts to the standard 7 component types in Hugo: `static`, `content`, `layouts`, `data`, `assets`, `i18n`, and `archetypes`. Yes, Theme Components can now include content, which should be very useful, especially in bigger multilingual projects. * Modules not in your local file cache will be downloaded automatically and even "hot replaced" while the server is running. * Hugo Modules supports and encourages semver versioned modules, and uses the minimal version selection algorithm to resolve versions. * A new set of CLI commands are provided to manage all of this: `hugo mod init`, `hugo mod get`, `hugo mod graph`, `hugo mod tidy`, and `hugo mod vendor`. All of the above is backed by Go Modules. Fixes #5973 Fixes #5996 Fixes #6010 Fixes #5911 Fixes #5940 Fixes #6074 Fixes #6082 Fixes #6092
This commit implements Hugo Modules. This is a broad subject, but some keywords include: * A new `module` configuration section where you can import almost anything. You can configure both your own file mounts nd the file mounts of the modules you import. This is the new recommended way of configuring what you earlier put in `configDir`, `staticDir` etc. And it also allows you to mount folders in non-Hugo-projects, e.g. the `SCSS` folder in the Bootstrap GitHub project. * A module consists of a set of mounts to the standard 7 component types in Hugo: `static`, `content`, `layouts`, `data`, `assets`, `i18n`, and `archetypes`. Yes, Theme Components can now include content, which should be very useful, especially in bigger multilingual projects. * Modules not in your local file cache will be downloaded automatically and even "hot replaced" while the server is running. * Hugo Modules supports and encourages semver versioned modules, and uses the minimal version selection algorithm to resolve versions. * A new set of CLI commands are provided to manage all of this: `hugo mod init`, `hugo mod get`, `hugo mod graph`, `hugo mod tidy`, and `hugo mod vendor`. All of the above is backed by Go Modules. Fixes #5973 Fixes #5996 Fixes #6010 Fixes #5911 Fixes #5940 Fixes #6074 Fixes #6082 Fixes #6092
This commit implements Hugo Modules. This is a broad subject, but some keywords include: * A new `module` configuration section where you can import almost anything. You can configure both your own file mounts nd the file mounts of the modules you import. This is the new recommended way of configuring what you earlier put in `configDir`, `staticDir` etc. And it also allows you to mount folders in non-Hugo-projects, e.g. the `SCSS` folder in the Bootstrap GitHub project. * A module consists of a set of mounts to the standard 7 component types in Hugo: `static`, `content`, `layouts`, `data`, `assets`, `i18n`, and `archetypes`. Yes, Theme Components can now include content, which should be very useful, especially in bigger multilingual projects. * Modules not in your local file cache will be downloaded automatically and even "hot replaced" while the server is running. * Hugo Modules supports and encourages semver versioned modules, and uses the minimal version selection algorithm to resolve versions. * A new set of CLI commands are provided to manage all of this: `hugo mod init`, `hugo mod get`, `hugo mod graph`, `hugo mod tidy`, and `hugo mod vendor`. All of the above is backed by Go Modules. Fixes #5973 Fixes #5996 Fixes #6010 Fixes #5911 Fixes #5940 Fixes #6074 Fixes #6082 Fixes #6092
This commit implements Hugo Modules. This is a broad subject, but some keywords include: * A new `module` configuration section where you can import almost anything. You can configure both your own file mounts nd the file mounts of the modules you import. This is the new recommended way of configuring what you earlier put in `configDir`, `staticDir` etc. And it also allows you to mount folders in non-Hugo-projects, e.g. the `SCSS` folder in the Bootstrap GitHub project. * A module consists of a set of mounts to the standard 7 component types in Hugo: `static`, `content`, `layouts`, `data`, `assets`, `i18n`, and `archetypes`. Yes, Theme Components can now include content, which should be very useful, especially in bigger multilingual projects. * Modules not in your local file cache will be downloaded automatically and even "hot replaced" while the server is running. * Hugo Modules supports and encourages semver versioned modules, and uses the minimal version selection algorithm to resolve versions. * A new set of CLI commands are provided to manage all of this: `hugo mod init`, `hugo mod get`, `hugo mod graph`, `hugo mod tidy`, and `hugo mod vendor`. All of the above is backed by Go Modules. Fixes #5973 Fixes #5996 Fixes #6010 Fixes #5911 Fixes #5940 Fixes #6074 Fixes #6082 Fixes #6092
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
I will make sure that having a
theme.toml
will keep on working, but having both of these is confusing and adds work in more than one way.A
theme.toml
can look like this:For a component with the above
theme.toml
I will rewrite it internally to this new structure inconfig.toml
:With this we will also
theme
config option (which will also still work), and introduce a newimports
slice, e.g.:min_version
withhugoVersion
with min, max and extended (as discussed in Rework the min_version for theme components #5450)A more complete
config.toml
could look like this:As I'm extremely bad at naming, please shout if you strongly disagree with the above.
/cc @onedrawingperday @regisphilibert @kaushalmodi and gang
The text was updated successfully, but these errors were encountered: