3 ms·
Sweet, I have been looking into Node for my Python SSR webapps, but Pug and Handlebars are just not cutting it. Jinja templating language is just soooo good. T
by martinbaun 2y ago
Sweet, I have been looking into Node for my Python SSR webapps, but Pug and Handlebars are just not cutting it. Jinja templating language is just soooo good.
This looks like what I wanted in a templating language
- supriyo-biswas 2y agoThere’s https://mozilla.github.io/nunjucks/ https://mozilla.github.io/nunjucks/ although it hasn’t been maintained for quite some time.
- lf-non 2y agoTry edge: https://edgejs.dev/ https://edgejs.dev/ It is mature and feature rich. I like that the expressions can be plain js and it is not coupled with html.
- saurabh 2y agoWe are using this as a standalone templating engine. It's easy, fast and has good error reporting. This is the main templating engine of AdonisJS.
- hombre_fatal 2y agoFwiw, you can use JSX without React. Another project on the HN homepage at the moment happens to do this: https://www.val.town/v/maxm/staticChess https://www.val.town/v/maxm/staticChess const { renderToString } = require('react-dom/server') renderToString(<ul>{[1, 2, 3].map(n => <li>{n}</ul>)}</div>) Granted, you have to configure it so that JSX is allowed in your JS. For example, by running your code as `tsx server.js`, but I find it so much better than Pug/Nunjucks of yore that it makes up for that downside.