If you have a bit of Nodejs SSR background, you would already be accustomed to templating libraries like Pug, Handlebars, EJS, etc. If you’re from a PHP background you would be familiar with the Blade templating engine. These templating libraries basically help you render dynamic data from the backend on the frontend. They also help you generate markup with loops based on conditions. - Source: dev.to / about 1 month ago
The right way to start is with HTML and motherfucking web site. https://motherfuckingwebsite.com/ Really. At this point this is what web sites should strive to be. Pug is a great way to write HTML by hand. I integrated it with GitHub Pages so pug sources get compiled to HTML and published when commits are pushed. Great experience. https://pugjs.org/ - Source: Hacker News / 9 months ago
To illustrate the process of migrating from Express to Fastify, we have prepared a demo application. This application utilizes Express, Mongoose, and Pug to create a URL Shortener app as follows:. - Source: dev.to / 10 months ago
Disclaimer: The markup of CodePen examples is still in Pug. However, you can view it compiled as HTML by opening the code tab menu and selecting "View compiled HTML" (But, by the way, if you are not already familiar with Pug Templates, I strongly advise you to check them out). Source: 11 months ago
I'm sorry about your doggie, but you have the wrong subreddit. The Pug template engine https://pugjs.org/ is discussed here exclusively. Dogs are not discussed here. Source: about 1 year ago
The pug support for my projects is the last step for final migration from VSCode to Helix - any suggestions as to what existing language can be used as a basis for adaptation? Source: about 1 year ago
If you want more, take a look on Marko, fresh, qwik or pug. Dind't tested yet but they look like same as Nunjucks. Source: over 1 year ago
I was the person who had to deal with the rename of Pug (formerly called Jade). It was super stressful but it did all turn out ok in the end. I hope the name change goes well for you. The thinking behind Pug was: it is short (especially good for a file extension), it is very easy to spell, and it was available on npm. Source: almost 2 years ago
There were(and still are) tools that decreased code duplication. Tools like Pug and others are Javascript scripts that compile custom HTML syntax into standard HTML. With their help, a developer can create one component(e.g. a header with links) and put it on many pages without duplicating the component code. If I need to change the component style or structure, I alter the code in one place. - Source: dev.to / about 2 years ago
I'm late to the party but I absolutely hate HTML so I use something called pugjs, which let's you write html in a more programming friendly way IMO. Source: over 2 years ago
I suggest you to use a template engine like pug.js. Source: over 2 years ago
The third way and the least preferred way is server-side rendering with template engines like ejs, handlebars, pugjs etc... Here we don't create any REST API. We render different html pages for different http requests and use react to pre-render some parts of the page. This is not preferred way to connect React and Node because we don't get the power of reactive user experience. - Source: dev.to / over 2 years ago
Both web frameworks support a huge number of template engines right out of the box: Pug, Jade, Mustache, Handlebars, and many others. Let's take a look at the Pug engine to see how a template renders in Express works:. - Source: dev.to / over 2 years ago
I found about IHP a while ago and it sounds exactly like what I've been looking for in a web framework: Beginner-friendly, stable, type-safe, functional. I got even more interested after I read your blog post on Auto Refresh[1], which sounds like it was heavily inspired by Phoenix's LiveView[2] (even though you don't mention it anywhere). Can you do a comparison between the two, in terms of how ergonomic... - Source: Hacker News / over 2 years ago
The concept is pretty simple- wherever some data is not pre-defined, we use template values as placeholders; wait until a request is received along with the data; and then inject it into the page before sending to the client. There are template engines like EJS and Pug that ease our job to generate HTML via template pages. - Source: dev.to / over 2 years ago
In this example we will use pug (formerly known as "Jade", and also originally created by TJ Holowaychuk) to define some templates that should be filled with the data needed in the email, and mjml to actually design the email content. - Source: dev.to / almost 3 years ago
In this article, we are going to take a look at a CLI tool called svpug for generating Pug mixins from SVG files. Before diving into the main content let's some context first. - Source: dev.to / almost 3 years ago
Pug is the template engine for our express app and body-parser is used to get the form-submitted values in our request body. - Source: dev.to / about 3 years ago
You can also have reusable UI components on the server side by using a more established and mature templating libraries like pug for Node. And I am quite sure that the templating libraries for other platforms like RAILS,Django also have the same or more advanced capabilities which will allow us to construct complex and dynamic HTML. - Source: dev.to / about 3 years ago
Our server application is a very simple one. We just render a simple HTML page with a form and input field to search for the user name. And we are using pug as our template engine for the express app and the body-parser library which is Node.js body parsing middleware to parse incoming request bodies in a middleware before your handlers, available under the req.body property. - Source: dev.to / about 3 years ago
Do you know an article comparing Pug to other products?
Suggest a link to a post with product alternatives.
This is an informative page about Pug. 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.