Template

Review

  1. 2022/11/18
  2. 2023/04/19
  3. 2024-08-17 13:12

[!Summary]

一、Introduction #

  1. Art-template https://github.com/aui/art-template 
  2. doT https://github.com/olado/doT 
  3. JavaScript-Templates
  4. Template.js
  5. Tempo
  6. ECT
  7. Dot Dom
  8. Template7
  9. Bunny
  10. Squirrelly
  11. Handlebars https://github.com/handlebars-lang/handlebars.js 
  12. EJS https://github.com/mde/ejs 
  13. Hogan.js https://twitter.github.io/hogan.js/ 
  14. Pug(Jade) https://github.com/pugjs/pug 
  15. jSmart https://github.com/umakantp/jsmart 
  16. ERB
  17. Slim
  18. Jinja
  19. Liquid
  20. Nunjucks
  21. Vash
  22. HAML
  23. Marko https://github.com/marko-js/marko

其他语言的模板语法实现

  1. PHP
  2. JSP
  3. smarty
  4. Mustache
  5. DTL(Django Template Language)
  6. Thymeleaf(Java)
EJS #

EJS is a templating language or engine that allows you to generate HTML markup with pure JavaScript. And this is what makes it perfect for Nodejs applications. In simple words, the EJS template engine helps to easily embed JavaScript into your HTML template.

Pug #

Pug is a JavaScript template engine. It is a high-performance template engine heavily influenced by Haml and implemented with JavaScript for Node.js and browsers. Pug was formerly called Jade.

Marko #

Marko is a fast and lightweight HTML-based templating engine that compiles templates to CommonJS modules and supports streaming, async rendering, and custom tags. It is HTML re-imagined as a language for building dynamic and reactive user interfaces.

Reference #