Skip to content

Tag: pug

Pug render 2 templates in the same row

Is there a way to render these 2 templates in one line in Pug? I have been trying with adding span or moving the code around but not able to fix it yet. This code renders but in 2 rows, I essentially want this code in one row. Any ideas are helpful! Thanks 🙂 Answer I actually figured this with

Randomly Populate table rows in Pug files

Until this morning, I did not know what Pug is. However, now, it’s being used in a theme that I am using for work. Ran into this situation. The current pug file looks like this. is there any way to fill up this data with javascript, using some random array. For instance, suppose I have an array like thi…

How to include image in email template using pug and img tag?

Whenever the email is sent to the user, the image isn’t loaded and the alt text appears. This is the img tag that appears in the inspector whenever i open the email in the browser. Here is the line of code within the codebase that contains the img tag I’m thinking that this has to do with sending …

Button inside jade table cell

I want to add a button to shown in each row of the table, But the button does not appear cant figure out why. I’m new to jade and node js Jade file Answer you are not indenting your th’s correctly (they need to be indented relative to the tr that they are in) and you need to include an

Pug file not loading CSS

I’ve got an express project set up. I’m using Pug as the view engine. I’ve got the following lines in my app.js, And I’ve got the following in my index.pug view, The CSS files are in the right folders (public/stylesheets), but when I load up the app, the view does not seem to load the …

Pug – generating Select and Options

I am new to Pug and I am trying to generate a Select set of Options like this: However the result I get, in the rendered page, is an empty select input followed by the list of options as text Answer Indents the code https://pugjs.org/language/iteration.html