6 ms·
I tried Zola and liked the speed and simplicity. However support for its templating language is scarce and I'm not super keen on writing extensions in Rust. I
by jacques_chester 6y ago
I tried Zola and liked the speed and simplicity. However support for its templating language is scarce and I'm not super keen on writing extensions in Rust.
I have also looked at Hugo, which is determined to uphold evil and suffering by using Go's horrible templating minilanguage; Nanoc, which is cool but at times inscrutable and perhaps a little too obscure; now I'm playing with Jekyll. In short I am doing everything except actually writing.
- mroche 6y ago> by using Go's horrible templating minilanguage Any specifics that stand out to you? I haven’t done a lot with templating, but when I was investigating Hugo a while back it seemed straightforward enough. But that was at a high level.
- regus 6y agoI've used Go's templating a few times, most recently I used it in my own static site generator. For me the most difficult thing about it is that it is another language grafted on top of Go, and it does not always do what you expect it to do. The documentation is hard read and not always clear on how things are supposed to work. For example: - If I pass in a struct that contains a map of structs, how exactly can I access this data? - How can I use the boolean output of a function within an if statement? - How do the if statements even work? "eq"? "=="? What is the correct syntax here? I ended up losing a lot of time having of to wrestle with the templating engine because it often would not behave the way I expected it to.
- mroche 6y ago> For me the most difficult thing about it is that it is another language grafted on top of Go, and it does not always do what you expect it to do. ... Ah, I see. At my first glance I thought it was just normal Go syntax. I’ll have to look into this more, thanks!
- dagmx 6y agoI've been using Gatsby recently and it's been pretty good, as long as you're not opposed to node and JS.
- smt88 6y agoWe're looking at Gatsby now. We don't care about the language used to generate a site as long as it doesn't send silent errors into the finished result (always a concern with JS...) What else did you try before landing on Gatsby?
- egeozcan 6y ago(not op) I personally love next.js but I guess it'd bee too flexible for some.
- cercatrova 6y agoI'd personally try NextJS, it's a lot easier than Gatsby. This is the main article that turned my mind after trying both: https://jaredpalmer.com/gatsby-vs-nextjs https://jaredpalmer.com/gatsby-vs-nextjs
- dagmx 6y agoI tried Jekyll, Hugo and Pelican. Neither sat as well with me personally as Gatsby. I like only having to worry about a single language stack, and I can use typescript with Gatsby which negates some of my misgivings with js. Plus I can use react paradigms everywhere which is nice.
- strogonoff 6y agoUsing react-static here. Has some issues and not always free of regressions, but also not as bloated as say Gatsby. If you write React components in a way that leaves them functioning when statically rendered, I think it is relatively straightforward to roll your own generator that calls React’s built-in renderToString() on top-level app component during HTML generation, and bundles basic JS that does hydrate() in case user agent happens to have JS enabled (those two methods do a lot of the heavy-lifting). Devil’s in the details, of course, but have been low-key looking into that lately.
- ibraheemdev 6y agoWhat sort of templating support did you find to be scarce with Zola?
- dangoor 6y agoWhile I'm not a fan of Go's template syntax, I do appreciate that there are a bunch of themes available for Hugo, and now a pretty easy system for working with them (modules). I like not having to spend a lot of time on the formatting to get something decent.
- esperent 6y agoI went from Jekyll to Hugo, because, although Jekyll was great at first, as the numbers of pages grew it for slower and slower until it was taking about a minute to compile. Switched to Hugo and compilation takes about 2s for the same site. On the other hand, yeah, there's lots of other frustrations - besides the weird templating stuff, they have one of the least friendly and helpful dev teams I've come across when I've occasionally asked a question on their forum.
- southerntofu 6y ago> support for its templating language is scarce Hello, i would say there's a few missing template features in Zola (especially hashmap literals/functions) but i don't find it scarce. Could you elaborate with your painpoints so they can be addressed for others as well? Zola is constantly evolving for the better, and the community forums are also a good place to exchange feedback/criticism
- jacques_chester 6y agoThe Tera template language is not in wide use, so multi-language integrations with HTML were non-existent when I checked. That's tremendously inconvenient.
- southerntofu 6y agoWell there is only a single Rust implementation for the moment, but tera templates are really similar to jinja (only difference i know is usage of named arguments in filters/functions). If i may, what's your usecase?
- jacques_chester 6y agoJust an ordinary static website. Some standalone pages, some blogging posts. I can take another look at Zola and see if I've changed my mind -- the speed really is excellent.
- southerntofu 6y agozola should be really fit for that, let us know if you encounter any issues
- Keats 6y agoYou can compile Tera to WASM if you want but that's the only solution if you want to use Tera templates outside of Rust. As mentioned, it is _extremely_ similar to Jinja2 in Python, a good number of Jinja2 templates should be valid Tera and vice-versa.