Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I would recommend poking around with 11ty,[0] which I find to be significantly simpler than Hugo.

The Go templating of Hugo is extremely confusing for most non-Go people. After using it for years I still constantly look up how to do simple conditionals.

11ty is a very competent, "good enough" generator. We used it to build this site[1] for CERN back in 2019 from scratch over the course of a few days.

[0]: https://www.11ty.dev/

[1]: https://worldwideweb.cern.ch/



Yes, Go templating is quite hard. There was a feature request[1] to implement the Django/Jinja2-like Pongo2 template engine[2], but got rejected because it would have been a too big change.

[1]: https://github.com/gohugoio/hugo/issues/1359

[2]: https://github.com/flosch/pongo2


Templates are the ugliest part of Django. They are completely unaware of the target syntax, so very often the template itself cannot be validated as HTML, which makes it difficult to lint or reformat.

The only tool I'm aware of that can (mostly) correctly reformat Django templates is the PyCharm/IntelliJ family of IDEs, but their reformatting often introduces subtle breakage (such as adding new lines inside tag attributes) and requires careful review.


Supposedly, Zola[0] was built in response to the deficiencies of Go templating. Having dipped my toe into the Go pool, I am tempted to agree.

[0] https://www.getzola.org/


Thanks, and nice job on the build :) I came across 11ty today. Looked interesting. But, the moment I see code blocks my brain shuts down. I try to stick it out, but it's difficult. Trying tho!




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: