Clean Syntax
PugJS offers a clean and minimal syntax that reduces the amount of HTML you have to write. This means less boilerplate and a more readable code, enhancing developer productivity.
Whitespace Significance
The syntax of PugJS eliminates the need for closing tags, which simplifies the code structure and makes the document easier to maintain.
Template Inheritance
PugJS provides powerful template inheritance features, allowing developers to extend and reuse templates easily, promoting DRY (Don't Repeat Yourself) principles.
Conditional Rendering and Iteration
PugJS supports conditional statements and loops, allowing developers to render content dynamically within templates, which is particularly useful for complex applications.
Integration with Node.js
PugJS is efficiently integrated with Node.js, making it an excellent choice for server-side rendering in JavaScript applications.
Server-side Framework SSR is when you use a framework that runs the HTML templating logic entirely on the server to compose the HTML that will be rendered in the browser. These are frameworks like Ruby on Rails, ASP.Net, PHP, or even Node.js frameworks that use templating languages like Pug or EJS. - Source: dev.to / 6 months ago
It is a novel experience to say the least for me. I mean yes I have been using Handlebars, pug, and other templating engines but this is novel in how it changed my perspective about HTML (Just read their motivation in htmx.org). - Source: dev.to / 7 months ago
We need a templating engine to render HTML code in the browser using Node.js. We'll use ejs (Embedded JavaScript) for this tutorial but there are others such as Pug (formerly known as Jade) and Express Handlebar, which also render HTML on the server. - Source: dev.to / 9 months ago
I've been using Go's html/template for the last couple of months and all I can say is that it's still very much a toy. It's fine for basic loops and conditionals but anything beyond that is extremely limited and having proper reusable components is a constant fight against limitations, specifically because of the lack of being able to pass multiple arguments to a template. I wish the Go team had gone with... - Source: Hacker News / 11 months ago
I hate writing HTML. Yes, there's IDE support for inserting s but it's just annoying. Same for lists of classes or attributes etc. For everyone else feeling like me: Try pug (formerly jade) or rather it's CLI variant pug-cli. You can reuse stuff and even have JS in it to iterate through stuff or give it parameters while still feeling pretty vanilla. https://pugjs.org/api/getting-started.html. - Source: Hacker News / over 1 year ago
Sounds like Time Out is a little bit limited in its rendering capabilities, but I think you could still consider using something like PugJS. Basically, you would write the master file, and any includes, then use the pug CLI to compile it down into one .html file. Source: almost 2 years ago
Templating engines are tools that enable developers to create HTML templates that can be dynamically generated and rendered by web applications. There are many templating engines available, but the most popular by far is Pug. Pug is a templating engine that is known for its simplicity and ease of use. It has over 21.3k stars on Github. Airbnb and Node.js use Pug templating engine. - Source: dev.to / almost 2 years ago
Are you proficient in the new UITK? If so, a Twitter Bootstrap, maybe a Pug abstraction would be VERY appreciated if sold on the asset store. Source: about 2 years ago
A much better approach is to use HTML templating languages, such as Pug and CSS frameworks, such as Tailwind CSS, to generate your HTML and CSS code on the fly. - Source: dev.to / about 2 years ago
It is developed in the Ruby language and is often used to create view templates for Ruby on Rails projects. But apart from that, it is very similar to Pug as well as other templating languages. - Source: dev.to / over 2 years ago
Templating languages are widely used in Web development and two of the most popular ones are Pug and Slim. In this series, we're going to learn the basics of these two and hopefully they would help improve your workflow further. - Source: dev.to / over 2 years ago
I'd recommend.checking out pug. You can use include to split up your html into different files oand use mixins for reusable blocks. Pug will also minify generated html, so that may give you slightly better load times and less data transfer. Source: over 2 years ago
You want an HTML templating engine most likely. I've used Pug quite heavily in the past for static sites, but there are many different options in case the Pug syntax doesn't appeal to you. Source: over 2 years ago
Here's a popular templating engine for Node: https://pugjs.org/api/getting-started.html. Source: over 2 years ago
So I spent a lot of time learning about what React is and why I need it so that I don't make the same mistake as I did with pugJs It might be the least useful thing I've learned. - Source: dev.to / over 2 years ago
The features we’ve looked at here are really just the tip of the iceberg! For the full specs check out PugJS.org — Getting Started. - Source: dev.to / over 2 years ago
We're going to use a templating engine called Pug. Pug is a simple templating engine that integrates fully with Express. The syntax that Pug uses is very similar to HTML. One important difference in the syntax is that spacing is very important as it determines your parent/child hierarchy. - Source: dev.to / over 2 years ago
Support for different template engines (Pug is a default one). - Source: dev.to / over 2 years ago
Https://pugjs.org/api/getting-started.html maybe? Source: over 2 years ago
I choose to make my demo in Pug. It's easy to mock up HTML as it can use variables. - Source: dev.to / almost 3 years ago
If you want a concrete example, that s why it s often a terrible idea to use pug’s render without the caching option: https://pugjs.org/api/getting-started.html. Source: almost 3 years ago
Do you know an article comparing Pugjs to other products?
Suggest a link to a post with product alternatives.
This is an informative page about Pugjs. You can review and discuss the product here. The primary details have not been verified within the last quarter, and they might be outdated. If you think we are missing something, please use the means on this page to comment or suggest changes. All reviews and comments are highly encouranged and appreciated as they help everyone in the community to make an informed choice. Please always be kind and objective when evaluating a product and sharing your opinion.