Is it possible to run Hugo in StackBlitz/WebContainers?
HmmYes. But not as easy as typing something and it’s up and running. You need to manage the Hugo version manually via node packaged hugo versions in your package.json (best via install:post-script) and update it whenever a new version is released (or stay on your version, you decide).
I am not sure, but this npm package seems to be working.
I am not up to date on this. Other methods might be more helpful for your requirements.
I am getting an error when trying that. Does Hugo have a wasm version?
No, it doesn’t. Releases · gohugoio/hugo · GitHub
What would be the best way to submit a feature request for this?
https://gohugo.io/contribute/development/
If you have an idea for an enhancement or new feature, create a new topic on the forum in the “Feature” category. This will help you to:
- Determine if the capability already exists
- Measure interest
- Refine the concept
If there is sufficient interest, create a proposal. Do not submit a pull request until the project lead accepts the proposal.
I’ve already changed the category for this topic.
The first step (determine if the capability already exists) is complete. The answer is no.
My take on this…
- There is insufficient demand to spend any time looking at this.
- Even if this were technically possible, the cost of development, documentation, testing, and maintenance would far exceed the benefit.
Also, although Hugo can be used in isolation to build simple sites, many sites implement features that require one or more of Git, Go, Dart Sass, asciidoctor, pandoc, or rst2html.
I have not the entire thread but
- The answer is no.
- The future answer is maybe, but I’m not currently convinced that it would add something.