7/20/2023 0 Comments Pug template mixinThere are probably more, but I'm not too knowledgeable or up-to-date in the subject - this post will focus on endeavors in Pug specifically. There are also templates used in frameworks like Angular and React that are deeply integrated into their frameworks (i.e., Angular's components and directives, and React's JSX). Some popular ones I'm aware of are EJS (an ERB-like Javascript solution), Mustache, Handlebars (an extension to Mustache but popular on its own), and Liquid (the Ruby-based engine used in Jekyll). There are a good number of templating engine options. In my case, it helps greatly with the generating all the static HTML for this website on the server-side: it removes a lot of the redundancy, performs some nice tasks like a simple minification, and allows for some nice scripting tasks like those I'll discuss here. A templating engine is used to generate HTML from template files, which allow you to incorporate some scripting logic. One of the more-or-less arbitrary design choices was to use the Pug (formerly Jade) templating engine. I recently wrote about how this website's build system is implemented. (Also recently) EE/CS The Cooper Union Home | Contact | Experience | Resume | Blog (Recently) Software Engineer Google Silicon
0 Comments
Leave a Reply. |