Re:Zola: A fast static site generator in a single binary
by CJefferson on Friday March 05, 2021 @11:58AM
(#26359051)
Personally, all I want is a full proper programming language in my templating. Every templating language ends up being irritatingly limited, for me at least.
[ Parent
| on HN ]
Re:Zola: A fast static site generator in a single binary
by mikepurvis on Friday March 05, 2021 @12:06PM
(#26359140)
I think that's the big divide in templating languages— whether or not you trust the template author. Zero trust is a template like Liquid which has some trivial scripting stuff, but nothing non-halting (written originally for Shopify, where storefront owners could completely customize their look & feel).
And total trust is PHP.
In the middle is the whole realm of somewhat-trusted, where the templates can embed varying degrees of executable script, but you are at pains to let users know that too much embedding is a bad practice, and that especially if they're "just a designer", they should work with someone from software team to implement a properly-encapsulated solution for whatever it is they want to do.
Re:Zola: A fast static site generator in a single binary
by Yoofie on Friday March 05, 2021 @12:50PM
(#26359669)
I use PHP for exactly this reason. I wrote my own single .exe binary (written in C++) that generates JSON files from markdown files + others. The JSON files are then turned into static files via PHP using whatever template I care to create.
I think people their life harder when they go out of their way to avoid using PHP when really it is suited towards these types of problems.
Re:Zola: A fast static site generator in a single binary
by mikepurvis on Friday March 05, 2021 @01:31PM
(#26360145)
I mean, it used to literally stand for Personal Home Page, so it sounds like you're using it for its original purpose.
Re:Zola: A fast static site generator in a single binary
by wccrawford on Friday March 05, 2021 @09:09PM
(#26364594)
It drives me nuts when people implement template languages on top of PHP. That was its purpose.
Re:Zola: A fast static site generator in a single binary
by xfer on Friday March 05, 2021 @12:14PM
(#26359233)
racket scribble might be of interest to you. https://docs.racket-lang.org/scribble/
Re:Zola: A fast static site generator in a single binary
by lenkite on Saturday March 06, 2021 @07:15AM
(#26366902)
Clojure hiccup: https://github.com/weavejester/hiccup
Re:Zola: A fast static site generator in a single binary
by akvadrako on Friday March 05, 2021 @01:13PM
(#26359951)
Python has had mako for a long time, which does this.
Re:Zola: A fast static site generator in a single binary
by ibraheemdev on Friday March 05, 2021 @12:13PM
(#26359211)
JSX seems to fit that bill, and many other languages have a comparable library.
Re:Zola: A fast static site generator in a single binary
by chrisweekly on Friday March 05, 2021 @12:46PM
(#26359628)
JSX (or even MDX) might fit the bill!