3 ms·
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.
by CJefferson 6y ago
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.
- dukeyukey 6y agoCareful, you might end up with PHP.
- mikepurvis 6y agoI 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.
- ibraheemdev 6y agoJSX seems to fit that bill, and many other languages have a comparable library.
- xfer 6y agoracket scribble might be of interest to you. https://docs.racket-lang.org/scribble/ https://docs.racket-lang.org/scribble/
- chrisweekly 6y agoJSX (or even MDX) might fit the bill!
- Yoofie 6y agoI 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.
- mikepurvis 6y agoI mean, it used to literally stand for Personal Home Page, so it sounds like you're using it for its original purpose.
- wccrawford 6y agoIt drives me nuts when people implement template languages on top of PHP. That was its purpose.
- akvadrako 6y agoPython has had mako for a long time, which does this.
- lenkite 6y agoClojure hiccup: https://github.com/weavejester/hiccup https://github.com/weavejester/hiccup