Skip to main content

Questions tagged [pug]

Pug (formerly known as Jade) is a robust, elegant and feature-rich template engine for Node.js.

0 votes
1 answer
46 views

What is wrong with the href in the pug?

/users/mihir/users/[object%20Object]/file.txt I have the following pug file and JS code to render the pug page. I have links for the directories and files in the path filepath, for which I am adding &...
Mihir Mutyampeta's user avatar
0 votes
1 answer
36 views

How to access a Render variable from the client (NODEJS + PUG)

exports.nuevoproyectoPST= async (req, res)=>{ const proyectos = await Proyectos.findAll(); //console.log(req.body); const {nombre} = req.body; let errores=[]; if (!nombre){ ...
Fabian Barua's user avatar
0 votes
1 answer
78 views

Using Object.assign() or spread ... operator in pug template

I have a 2 Pug files. The first define config object (base.pug) object like below const config = { name: 'abc', age: 25} The other Pug template (main.pug) which includes base.pug and wants to ...
Tanmayee 's user avatar
0 votes
1 answer
53 views

How to remove the / at the end of my url with 11ty

I'm using vite, 11ty and pug to create a website and I'd like to have no / at the end of my url. I tried to do it for example with About page but it didn't work. --- permalink: | | "/About"...
Nico's user avatar
  • 1
0 votes
1 answer
571 views

How use nice-select2?

Link to the plugin https://github.com/bluzky/nice-select2/tree/master I can't connect nice-select 2, I added css and js files from the dist folder to my project, connected them and wrote a line from ...
titsilia's user avatar
2 votes
3 answers
382 views

Cannot read properties of null (reading 'name')

I am following The Odin's project local library tutorial (Express app). Here is my code (only relevant parts): in routes/catalog.js I have this router.get("/books", book_controller.book_list)...
Piotrek940's user avatar
1 vote
1 answer
68 views

Passing Pug variables from child template for use in parent template block

I'm working on a project that utilizes the Pug template engine. All my Pug files (layout.pug, head.pug, index.pug, etc.) are stored within a folder named pug. In my layout.pug file, I've established ...
Aditya Sutar's user avatar
0 votes
1 answer
49 views

Express with Pug, How to add image in email(Not as attachment but as part of message content)

I want to send an image in the email as part of body and not as attachement. i have image in my template and does not appear when i send the email. i am new to this stuff, any body have an idea??
Milan jotva's user avatar
0 votes
1 answer
33 views

Is it possible to make pug each inside an array in a script? [duplicate]

I have such a variable in a separate projectTemplate.pug: - var projectTemplate = [ { full: full250, tiny: tiny250, class: classPhotoset }, { full: full249, tiny: tiny249, class: ...
dhpro100's user avatar
-3 votes
1 answer
44 views

If not using render then which HTML file will be used to display content on the web?

I am creating a project in Node.js. If I am not using render then which HTML file will be used to display content on the web when using res.send('respond with a resource') app.js var createError = ...
Ankit's user avatar
  • 275
1 vote
1 answer
229 views

How to write an syntax highlight injection for vscode?

I am trying to write an injection grammar for pug to get JS and scss highlighting in the content of certain mixin calls. //- Example Pug file +module. const myVar = {}; I'd like the contents to be ...
Scott Casey's user avatar
0 votes
1 answer
20 views

JS / PUG Populate selector from nested array

I have the following nested array of objects : [entity{ name : "entity1",accounts [{name ="account1"}, {name ="account2"}]}, entity{ name : "entity2",accounts [{...
Mohammed Riyadh's user avatar
0 votes
0 answers
22 views

Placing an iframe in root file (pugjs file) in React

I am trying to use an iframe code within my react component. Obviously, this works: export default function Newsletter({ page }) { return ( <div className={`${styles.newsletter} newsletter-...
Jim Jones's user avatar
0 votes
0 answers
33 views

Why is my dynamic bootstrap table not working in PUG Vue?

So here is a example of section of vue code with a dynamic bootstrap table. This code works where if i click on a depart_time cell the datepicker element is activated. <template> <b-table :...
Llewellyn's user avatar
0 votes
1 answer
22 views

Page not opening node js

Hi everyone i am new to node js and creating a simple web e-comerse website using node js and a templating engine using PUG I am following MVC so far for my shop routes everting is working fine but ...
RIZWAN ALI's user avatar

15 30 50 per page