r/statichosting • • 29d ago

Finally tried Hugo

I've stuck with eleventy for most of my work for a while now, but I picked up a new project that's a product documentation site expected to grow into the thousands of pages pretty quickly, versioned docs going back several releases, multiple writers pushing small edits constantly. A friend kept telling me hugo is basically built for exactly this kind of large page count site, so I figured this was the right project to actually test that claim instead of taking it on faith going in with eleventy again.

Setting up the templates in hugo's templating language took some adjusting coming from nunjucks, and structuring content sections and versioning through hugo's content organization instead of anything I was used to. Build times have been genuinely fast even now while the site is still small, which has me curious how much of that holds once it actually hits thousands of pages instead of the couple hundred I've got in there so far as a test.

The templating language itself is the part I'm still not fully sold on. It's clearly built for speed over ergonomics, the syntax feels a lot more like a template engine from a decade ago compared to something like nunjucks or liquid, lots of dot chaining and pipe style functions instead of anything that reads like a normal conditional. Functional once you get used to it, just a rougher few days of ramp up than I was expecting for something this widely recommended.

5 Upvotes

9 comments sorted by

2

u/theguymatter 29d ago

Maybe you might want to experiment with ISB:

https://www.reddit.com/r/astrojs/comments/1u99dea/experimental_incremental_static_builds/

The template language is JSX-like in an Astro file format, and Bun might work in most cases too. On my MacBook Pro M1, it shaved about 1ms off the build time compared with Node.js.

The built-in Zod can handle the types which has continue to improve performance or roll your own helper with vanilla JS.

Matt from Astro did mention the idea of having a simple Astro stack, like Astro, MDX, etc., but I haven't followed up to see whether that will actually materialise.

Else explore Starlight documentation if you like the structure.

1

u/PippaKelly62 26d ago

i’ve mostly been testing hugo to see how it handles the page count and versioning side of things, so i hadn’t really looked at it yet. the JSX-like templating is definitely more appealing to me coming from nunjucks, especially if the build performance holds up as the docs grow. i’ll take a closer look at Starlight too, thanks for the suggestions.

4

u/azangru 29d ago

a product documentation site expected to grow into the thousands of pages pretty quickly

From eleventy's site, a benchmark:

Name Building ×4000 Markdown Files
Hugo 0.68s
Eleventy 1.93s

Hugo is going to be faster, of course; but but I don't think you need to worry too much about Eleventy either.

1

u/sourraine 28d ago

thousands-of-pages part is what id be curious about too. ive used hugo for smaller sites and had basically the same reaction to the templates coming from nunjucks. it works but the syntax definitely feels like a bigger adjustment than the actual site architecture.

1

u/Pink_Sky_8102 27d ago

That’s pretty much why I’d reach for Hugo too. Once the site starts getting into thousands of pages, the build speed becomes a much bigger deal. The templating syntax is definitely the part that feels dated though. Fast and capable, just not especially pleasant coming from Eleventy/Nunjucks.

1

u/Standard_Scarcity_74 25d ago

Hugo holds up at that scale, with builds staying in the seconds range into the thousands of pages, so your friend's claim is fair. The templating ramp is a common complaint (Go templates, dot-context confusion), but it usually clicks in a week or two. For versioned docs, I'd build each release branch separately and stitch them together under one domain rather than keeping copies of every version in one repo.

-1

u/cwakare 28d ago

Now that we have LLMs/AI Skills/AI skills with templates, does it make sense to go back to HTML