3 ms·
I really like the speed of Hugo but I find the template language unintuitive and hard to read e.g. "if or condition1 condition2" and "lt 1 2". I wish you could
by seanwilson 9y ago
I really like the speed of Hugo but I find the template language unintuitive and hard to read e.g. "if or condition1 condition2" and "lt 1 2". I wish you could swap it out for something else like Liquid templates...is that possible?
I'd just go for Netlify as well for hosting. It'll build Hugo sites for you when you push commits, they have a CMS you can connect with most static site generators, they deal with SSL setup for you and tons more features. Self-hosting anything eats up time and it wouldn't be as robust.
- kaushalmodi 9y agoI have learnt that you can throw in parentheses for readability.. if (or cond1 cond2)
- cmsd2 9y agoThe next logical step is to mark with parentheses the two branches of the if expression: (if (or cond1 cond2) (then) (else)) although i suppose it's not really hugo anymore..
- seanwilson 9y agoIs there a reason something more standard like "if cond1 or cond2 then x else y" isn't supported? Parsing speed?
- kaushalmodi 9y agoGoing along with the joke, that's almost how elisp (most of the other lisps too, I believe) works: (if (or cond1 .. condn) (progn (true1) (true2)) (false1) (false2)) But in Go templates, it would be: {{ if (or cond1 .. condn) }} true1 true2 {{ else }} false1 false2 {{ endif }}
- sgallant 9y agoNetlify + Hugo is an pretty amazing combo. If you want to try a different CMS, my team is building https://forestry.io/ https://forestry.io/. It's a CMS for Hugo and Jekyll sites that commits all changes back to your repo.