Hugo

Some thoughts about the next Hugo version

There will be some nice headlines in the next Hugo version, among them Hugo Modules.

I spent some time porting a theme of mine to the new setup. It had some elaborate home built bundler setup that ported a Ruby based site to Hugo … And I must say that it was really nice seeing how easy it was to map a “totally not Hugo” site into by mounting folders doing some SCSS and JS overrides etc.:

You will like the new mount configuration, which can be used for any of Hugo’s component types (content, assets, static …) and also to define a project/theme’s own mounts. Really nice.

12 Likes

This is going to be amazing for using/maintaining reusable tools!

1 Like

Yes it is. But there are more upsides to this. I’m not thrilled with all the design choices I and others have done in Hugo, but we have done mostly sensible stuff. And many of that stuff may not have added tremendous value at the time, but with the tools coming next, it kind of comes together. The work we did on “theme components” with that big union file system, and all the Hugo Pipes stuff (I’m so happy we insisted on “resource.Get looks in /assets only” etc.) … These were kind of hard to use at scale before with all the manual packaging … but now.

I kind of want some tools to glue the NPM world into this, but I’m really, really happy about what I’ve been testing the last days while you other jamstackers have been drinking beers in London :slight_smile:

And don’t let me start on the content side of this. Now Hugo Docs can finally be translated with a sensible work flow … The Kubernetes docs are translated to 10+ languages in one monorepo. Imagine how better it will be to split these into multiple (per language?) repos with each its respective editors. Getting “spelling fix” PRs in dozens of languages you don’t understand does not scale.

5 Likes

We sure missed you.

What happens if I reference a module like this? Will it download like a submodule and update itself if needed or is that something that needs to be done by hand?

It’s backed by Go Modules. You will be pleased, trust me on this.

I was a little short there, but I’m on mobile on a jazz festival. There is a lot written about this by me somewhere else, but I really like how it works.

1 Like

I miss being more active in the Hugo community but am really excited to see what’s coming up next. Modules sound infinitely useful. Thank you so much for the tremendous amount of brilliant, difficult work you (and others) have put into this project, @bep, and cheers all around to the folks lucky enough to be drinking beer at the JAMStack conf :smile:

This is not meant to sound ungrateful with all the cool stuff delimited with modules, so please take this as just curiosity, but will this next release also include the creation of pages from data sources? Can’t seem to find previous threads on that here and on Github, but I’ve been out of the loop for a long time…

++++++1