pugjs / pug

Pug – robust, elegant, feature rich template engine for Node.js
https://pugjs.org
21.7k stars 1.95k forks source link

✨An alternative to PugJS that feels like Pug on steroids #3433

Closed georgelemon closed 7 months ago

georgelemon commented 7 months ago

Give a try to Tim Engine, a new template engine & markup language available for Nim programming language and Bun/Node JavaScript runtimes. Tim is compiled, fast, has built-in browser sync & reload, a built-in interpreter, can switch to client-side rendering using the same syntax, and much more!

echo "Hello" // inline comment, duh

div.container > div.row > div.col-lg-7.mx-auto
  h1.display-3.fw-bold: "Tim is Awesome"
  a href="https://github.com/openpeeps/tim" title="This is hot!": "Check Tim on GitHub"
  div#stuff

// client-side rendering
@client target="stuff"
  button.btn.btn-dark: "Hello from JavaScript"
@end

// vanilla javascript
@js
console.log("Hello, hello, hello")
@end

Soon enough there will be a standalone CLI that can produce S2S compilation to various targets, such as JS, Ruby, Python and more. Cheers!

rlidwka commented 7 months ago

Syntax looks different, so it doesn't "feel like Pug" (and Pug isn't even mentioned anywhere in your README, so compatibility is not a goal).

If you want to suggest alternative templating engines (there's plenty around), you're very welcome to write an article with syntax & performance comparisons. But as it is now, mentioning only one here (which is your own) feels more like an unsolicited advertisement.