Imustaskforhelp 1 day ago

I wish if there was some hugo alternative to it , I guess I am going to go into the weeds of this project to replicate it in golang

1
arp242 1 day ago

Hugo more or less is "Jekyll, replicated in Go".

The core problem you will run into is that Go is a very static language, and Ruby is a very dynamic "free for all" language. Obviously up- and downsides to both approaches, but IMHO Ruby is clearly a much better fit for this sort of thing. On my own Jekyll website I do syntax highlighting with Vim's :TOhtml. I like how my Vim looks and I know how to tweak Vim syntax files. Kind of crazy I guess, but it works, and it's actually very little code. I would be hard to replicate this in Hugo, or any other Go-based site generator.

Similarly, doing a plugin like jekyll-sqlite will be hard. You can bake it in of course, but people experimenting with random stuff like this? Not going to happen with Go.

Not that Hugo can't be improved on by the way – I have generally found using Hugo to be highly complex and a forest of weird confusing errors that don't make much sense. But you will never really replicate Jekyll in Go.

I like Go. I have written tons of Go code over the last 10 years. But for some things it's just not a great fit, and this is one of those things.

captn3m0 1 day ago

Hugo got a WASM based plugin system, but real scripting plugins that would be needed for SQLite are still a feature request: https://github.com/gohugoio/hugo/issues/5510

arp242 22 hours ago

That would be an improvement, but it still wouldn't be equivalent to what you can do with Ruby and Jekyll. For example I do [1] so I don't need to put dates in my post names, which also fixes a bug [2] I encountered but was never fixed.

[1]: https://stackoverflow.com/a/68287682/660921

[2]: https://github.com/jekyll/jekyll/issues/8707