The table indicates both as being "fast" so that leaves jekyll compatibility as the primary differentiating factor.
Not familiar with jekyll, so cant tell what sort of pool of users that compatibility promise applies to.
But here is a tip: the weak point of hugo is its documentation ;-)
{{ if (and (or (isset .Params "title") (isset .Params "caption")) (isset .Params "attr")) }}Does anyone know why the templating situation is the way it is in go? In many other languages you have multiple competing templating languages, but in go this is basically what you get. Are there language specific features that make it hard?
EDIT: interesting to final see active liquid templating engines for go. now if only legacy would allow for the use of these things.
You are only able to only use partials in HTML pages and shortcodes in Markdown pages. Why? They use 2 different syntax, so the best you can do is awkwardly wrap a partial in a shortcode. What's the point? They serve basically the same purpose.
Want to set up RSS? Oh yeah, for some reason by default it will not show full content in your feed reader, instead only a small extract. The the only way to fix it is by making your own template[1]. But wait, why are we using RSS instead of Atom? Who knows, but if you want to use Atom, you have to use your template and insert some stuff to your config.
Also don't look at the bug tracker, that thing is frustrates me to no end.
You of course have the everyone's favourite Stalebot that you might have noticed in my previous link, but if you look at older issues, you will see the maintainer self-botting as a Stalebot[2][3] for some reason.
You will also see the maintainer moving issues between milestones for years with no end in sight[4]. That's not a one-off, click on any issue.
Changelogs can sometimes feel a bit, odd too:
> but also a big shoutout to @dependabot[bot], […] for their ongoing contributions.
And commit messages sometimes are just… a bit too long[5] (it is truncated by GitHub, you can append .patch to see the full message).
Their documentation is awful to read too[6]. Oh and the templating engine? Yeah, not documented at all. Also the quick start guide will tell you to git clone some random theme, but I don't want my website to look like someone's, I want to write my own styles and have my own structure, but they don't really tell you anywhere how you should go about it. Because of it, I would search GitHub to sometimes find answers on how to do some stuff, but you would quickly find that most people had no idea how to actually use it. For example you can find a lot of people making opening and ending partials to have a common page layout instead of actually using the built-in Hugo layouts.
So why have I bothered switching? i18n support, so far out of all SSG I tried, Hugo does it in the least painful way.
[1]: https://github.com/gohugoio/hugo/issues/4071
[2]: https://github.com/gohugoio/hugo/issues/385#issuecomment-283...
[3]: https://github.com/gohugoio/hugo/issues/1035#issuecomment-28...
[4]: https://github.com/gohugoio/hugo/issues/448
[5]: https://github.com/gohugoio/hugo/commit/6dbde8d731f221b027c0...
My blog's migration anno took only a few days, including a template creation from scratch. My template is still unfinished unfortunately, as Hugo was missing features I needed for my vision back then, and since then I gave up a bit on blogging because of the papercuts mentioned, and the immense timesink that is creating reasonable quality content for publishing. (I do paper-based journalling mostly nowadays since then).
Recently just reviewed the Hugo changelogs since the version I use, and now it knows everything I need to finish up my blog (especially features around images and internationalization were missing, since my blog is not in English, and Hugo used to miss a lot for tiny stuff supporting non-english sites properly, eg. date string localization, sorting for localized tags, like the 'abc' in my language starts as 'aábc', but á got sorted after Z (yes, capiztal Z) if I recall correctly, making localized tags hard to use.). I had some hacks for some in place, but it was tiresome. Now Hugo has all the bells and whistles I need, even more than enough... It is hard to wrap my head around the plethora of features and new concepts. I wonder if the docs cover my usecases, or I'll need to do some Sherlock Holmes stuff once again, to get going...
So the takeaway of this rambling? Hugo is great, it is fast, and by now it probably knows everything one can reasonably need. But man, it is hard to learn, it has become a huge topic, as sitebuilding naturally has its depths, just like any other topic, once real life problems are to be solved with it. The docs? Not great, not terrible. Overall I still recommend it over anything else, as the docs are still okayish for basic stuff. I like it, it is a great project. I love that almost every changelog includes that it got faster a little bit. Atypical for current software project. And it is fast indeed. (experience from a 5 year old release) I have worked with some trendy javascript based web authoring tools at workplace, and man they were all sluggish and had way worse developer experience than Hugo, also their docs weren't better at all. (has nothing to with Js apart from being popular nowadays)
I gave up on this ever being fixed quite a while back, but still check on the issue [1] every now and then. Seems like the only activity these days is bep bumping the milestone every month.
Hugo builds my whole site in less than 10 seconds and reloads individual post changes in milliseconds. It’s a game changer while previewing edits.
I agree, it's a nuisance that a full build can take a while (my own site, which has almost 600 posts plus a bunch of other random pages, takes at least 30 seconds for a full build, if memory serves), but it's hardly a dealbreaker.
I believe GitHub Wikis are also rendered with Jekyll? Without customization capabilities on the user side, Gojekyll could be used here, too.
All of this is without cache, and with incremental builds disabled; it will obviously be faster with cache and incremental builds.
I don't know where this "Jekyll is notoriously slow" comes from; maybe it was (very) old versions, or maybe it's some plugin people use, or maybe something else, but I've used Jekyll for a number of websites over the last ten years, and I never really had any performance issues.
Certainly today, I think it's unfair to say that Jekyll is "slow". Yes, Go is faster, which should hardly surprise anyone, but for most purposes Jekyll should be more than fast enough, and you'll hardly notice the difference with something faster like Hugo or GoJekyll.
If I disable that your project builds in 30 seconds (no cache!) on my pretty old and not very fast i5-8350U, which is roughly what I'd expect for a project of this site. It will be even faster with cache, obviously.
I didn't look too closely, but I'm reasonably sure that can fixed so the total build time will be 30-40 seconds without to much effort; it looks like it's just generating the same HTML every time, so just caching it on the first generation seems like the obvious way.
And sure, Gojekyll is loads faster and more forgiving of these kind of inefficiencies, but "a few minutes" still seems pretty slow, especially considering even plain Jekyll can do it significantly faster.
But lack of plugin support is a pretty huge difference with the real Jekyll.
Genuine question, but why? My assumption here is that builds are infrequent and static sites gravitate towards being smaller in size, and that in most situations you’re building as an automated action following the addition/modification of a page. Does it matter if the build takes 1s vs 20s?
Even dynamically building during authoring, I rarely run into situations where ruby/js static site builders feel overly slow. Curious if my assumptions of how people are using these are wrong however so would love to hear your take.
In development it takes Jekyll 32 seconds[0] to do a full build and I've done my best to eliminate as many performance killing nested loops as possible. If I use --incremental it takes about 3 seconds, so my normal writing flow is to split my browser and code editor and I see real-time live reloaded feedback in 3 seconds.
It's pretty good, but some changes require a full build and waiting 30 seconds stinks. If I could snap my fingers and have a fully compatible Go solution that built it in 3 seconds all the time I'd switch without thinking.
Gojekyll isn't compatible with a few plugins I use and switching ~700 posts, a bunch of templates and a few custom plugins to Hugo isn't worth it for my use case.
On the other hand I'm locked into Jekyll 3.X because I can't get Jekyll-Assets to work with any other version so at some point I'll switch but I'm not looking forward to porting that many templates and posts. If it comes down to it I'd probably end up writing a custom tool to convert everything especially since I do custom'ish things with front matter like create a table of contents for each post. It'll require a bunch of string parsing.
[0]: This is on a 9 year old quad core i5 3.2ghz workstation with an SSD.
* Fast builds are way more pleasant during development. "Incremental" per-article builds help, but not in all scenarios. Nothing kills my motivation faster than having to wait 30 seconds to preview a fix.
* Fast builds help us avoid jams in our automated push-live systems. Sometimes we have many editors updating pages during a big event. You could consider many different trade-offs when deciding how to manage these queues. But a fast build time erases a lot of those conversations.
We use 11ty on most of our sites. We've found 11ty itself to be fairly performant. The slugs tend to be everything related to processing assets: JavaScript bundles, Sass builds, image manipulation, etc. By streamlining those activities, we can usually get a site build down to just a few seconds.
That said, "instant build" is the dream that animates the best conversations on our team, and we've started building our own static site generator. Our SSG can run both on the server and in the browser. We want our editors in our CMS to be able to get instant, true previews of the page they're editing. Then we want to be able to push single-article builds live, instead of always rebuilding the whole site. It's early days yet. Maybe you'll see it on a "Show HN" some day.
Gojekyll currently supports the github pages, sass, jemoji, sitemap, feed, redirect, seo tag and avatar plugins, among others, see https://github.com/osteele/gojekyll/blob/main/docs/plugins.m... for the full list.
What it does have is a bunch of optional features that are typically provided by plugins in Jekyll[2], but this is a very different meaning of "plugins" that Jekyll has.
[1]: Whether you should be doing this is a different issue, but I would argue that for a static website builder it's fine, especially since you can just lock the Jekyll version with little downsides, and Jekyll doesn't change that often in the first place.
[2]: A list of them: https://github.com/osteele/gojekyll/blob/main/docs/plugins.m...
What are your thoughts on developing a compatibility layer?
This isn't possible with Go, because it's just not that kind of language; it's more or less impossible to have a plugin system similar to Jekyll.
My dayjob is to write Go code and has been for almost 8 years, I think Go is a great language. But I don't think the language is a great fit for this kind of thing.
for f in ./posts/*.md; do
dst=site/$f:r.html
cat head.html >$dst
markdown $f >>$dst
cat footer.html >>$dst
done
Or some variant of that, in your preferred language. There's loads of things you can do wrong in Jekyll even without any plugins, and this applies to most static site generators.Anyway, I have a list of plugins at [1]; some are as simple as "don't use leading 0 for dates but a space" so it looks nicer (IMHO) but still aligns well, and others are a bit more crazy such as "use Vim's :TOhtml for syntax highlighting because I think Rouge looks horrible".
Stuff like "show all posts with the same tag as the current post" could be done in pure Liquid template too, but this is usually a lot more awkward and a lot slower, and convenience tags like {% warning %}Watch out!{% endwarning %} are completely unnecessary as such, but it's just convenient and nice.
[1]: https://github.com/arp242/arp242.net/tree/master/_plugins
Ways to [ab]use SSGs to fulfill your twisted whims are legion.
If you want to customize the Markdown parser or similar, it requires to change the Go code and compile everything yourself, which is not great especially from a maintenance perspective. But I wonder, would it be possible to add more extension points and then only compile plugins written in Go instead of the full source code of the tool plus your modifications? IIRC, Go does support something akin to shared libraries but not cross-platform.
I only put our blog posts a couple times per year, but it seems that the Jekyll dependencies move beneath my feet and break routinely. This is especially a pain because Jekyll and homebrew are the only ruby projects I work with frequently, and so I'm always at a loss for how to fix things -- rbenv, updating gemfiles, do I need to gem or rake or bundler something, architecture-specific problems with C dependencies, yuck.
For now I just put everything into nix which seems ok, but I think I may make a third attempt at switching to Hugo soon, or maybe this, or maybe cobalt.
Luckily my use case is super basic (just a personal website with a bunch of my projects), so a good solution for me was to switch to a custom Python script that pulls in liquid and markdown packages and has just enough features I need to generate my site.
After porting my blog to Hugo, having a single binary that can perform all tasks on all three operating systems I use (MacOS, Windows, and Linux) is a blessing, and now the blog builds incredibly quick.
Other than that: if it works today, it should still work in a year, or 2 years, or 5 years.
I'm not sure that's a good idea. While you might avoid unexpected updates to Ruby, you'll also avoid security patches for CVEs.
I wouldn't call a generator that does not support dates in URLs feature-rich. Zola seems extremely opinionated. Dates in URLs are supported by nearly every SSG out there and it seems quite crucial if you want to migrate from one of those and keep your (cool) URLs.
If I’m getting what you mean correctly, Zola does support that, look for index transparency, add “transparent = true” to your _index.md, this post explains it for adding “blog” prefix [1] but you can do it with year prefix, then month prefix inside, your folders structure will be years, inside it months, inside it your posts, and your URL will be like this “site.com/year/month/title” (I did the same concept as you can see in these URLs [2]), that, or just write the date in your .md file as in “2023-May-some_title.md” like I did in my blog (empty blog, didn’t yet migrate but it explains it)[3]
[1] https://peterbabic.dev/blog/setting-url-prefix-in-zola
[2]
https://tamim.io/professional_projects/nerds-heavy-lift-dron...
Rewriting Jekyll in the original language with this feature set and compatibility would be faster as well.
The only reason I left Jekyll for Hugo was that I could not maintain a working installation because of all dependencies and messy package management in Ruby.
Pretty awesome that it's Bjørn, the Hugo developer that's behind Gojejyll.
I don't want it to change. It's slow to run, but I edit my templates and run a single bash script to update my site when I need to.
I'm a data point for "I don't need a faster Jekyll, especially if compatibility breaks"