Skip to main content

Questions tagged [pug]

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

-1 votes
1 answer
32 views

Can I use pug template with angular builder esbuild?

In angular 17, I am using "builder": "@angular-builders/custom-webpack:browser". Now I want to use esbuild buider. But my project currently use pug template alter for html. Can I ...
Minh Đặng's user avatar
1 vote
1 answer
35 views

Colon symbol in class names for tailwind break Pug files

I am creating a project in Vue where the HTML aspect of it is written in pug. When I add a tailwind class, (for example in this case I am trying to add the classes ) .w-16.md:w-32.lg:w-48 Since it is ...
Joao Moita's user avatar
-1 votes
0 answers
31 views

Who manages logins the API or the front end web app [duplicate]

I'm working in a team where I'm developing an ASP.NET Core 8.0 Web API for a multi tenant application that returns results from a SQL Server database, and someone else is developing a web portal that ...
Shmiel's user avatar
  • 1,251
0 votes
0 answers
26 views

How can I enable Intellisense support for .pug files in vscode?

My angular project use pug template, is there any way setup intellisense for pug template file? I had tried package pugjs-angular-language-service. But it didn't work, it will better if it has ...
Minh Đặng's user avatar
0 votes
2 answers
37 views

Pug can't read array, but only if iterating through it

I am working on a small Web-development project, express with pug as the view-engine, for my University-course. I wish to iterate through an array of Weather-stations, creating a route for every one, ...
Melontree productions's user avatar
1 vote
1 answer
43 views

How do I use a module rendered by the controller with a Jade/Pug template as an argument to an event handler in the Jade/Pug template

I have this module naija passed to a template from the controller like this: res.render('testing', {title:"filter setting page", nigeria:naija ...
Femi's user avatar
  • 21
0 votes
1 answer
29 views

I get null in req.body when submitting data through pug form

this is pug form which is sending data to the requested url form.form.form-user-data(action='/submit-user-data' method='POST') .form__group label.form__label(for='name') Name ...
harshit's user avatar
0 votes
0 answers
17 views

pug/uikit nav sidebar lost left padding after uikit upgrade

I forked from this https://github.com/chekromul/uikit-ecommerce-template to build a static github page. but after I upgrade uikit to latest version, the side navbar lost its left paddings. before I ...
bhw1899's user avatar
  • 87
3 votes
2 answers
69 views

What is the order loaders applying in Webpack?

I am trying to setup the loading of .pug files by Webpack depending on interim filename extension, herewith it should be default one. In my case, the files which names ends with .vue.pug must me ...
Takeshi Tokugawa YD's user avatar
1 vote
0 answers
21 views

How can I use the selected option value of a select element in Pug/Jade template

I have this select in Pug/Jade select.form-select.col-xs-12.col-sm-12(id='selState1', onClick='+setState(selState1.value)') option(value='selState1', name='selState1',id='selState1') ...
Femi's user avatar
  • 21
1 vote
0 answers
36 views

Render block content with pug doesn't work

I'm face off an issue with Pug engine template. I can't inject the content of a Pug file into my layout, nothing is render! I have a home.pug which extends layout.pug, these two files are in the same ...
EmmanuelL's user avatar
1 vote
0 answers
66 views

How to get the static folder using Pug with Vite (Vituum, vite-plugin-pug…)

I'm using Pug for the first time with Vite and the plugin @vituum/vite-plugin-pug. Here's the structure of my project: src js css static imgs image.jpg views pages index.pug I'd ...
Lucie Bachman's user avatar
1 vote
0 answers
34 views

Read JSON in Pug NodeJs

I am sending a variable in the rendering response of my index view on my website, this variable is a JSON, but I cannot read it in Pug. JSON: { "expirepass": false, "memberships&...
Francisco Castillo's user avatar
0 votes
0 answers
24 views

How to read a json with pug NodeJs?

I am sending from node to my pug template a json in the response like this: res.render("memberships", { title: "DashRoc - Membresías", settings: JSON.parse(req.session....
Francisco Castillo's user avatar
0 votes
1 answer
194 views

Vuetify v-menu color

I am trying to change the color of the dropdown background of a v-menu. Right now it is just white then in dark mode it is that dark gray. I have tried the css override using this: .v-menu__content {...
VVaFF's user avatar
  • 13
0 votes
1 answer
25 views

Is this a pug template bug or my misunderstanding of the grammar?

I have the following code: - var a = 5; - var b = 3; script if (a === 5) if (b === 2) . var x = true; include script.js I want to include the script.js file when a == 5 and if b === ...
AGamePlayer's user avatar
  • 7,616
0 votes
0 answers
15 views

Array send by post form always received as string with first element only in Node js Express with pug

enter image description here { name: 'THERAPY 1', testsuites: '65e93cc4950e6a858809348f', description: 'UPDATED The pump software shall provide the Maximum Bolus Value therapy setting value ...
Kartik Aiyar's user avatar
1 vote
1 answer
93 views

Can't escape characters in pug/jade

I'm trying to escape special characters in pug/jade but it keeps giving me errors. I tried !{}, #[] and #[!] but non of these options allow me to use "(" character. p. !{(} Edit !{>} ...
bye-csavier's user avatar
0 votes
0 answers
30 views

how to make html div displays as 3 Column in pug

i want to display .course-item as 3 Column the .course-item in inside foreach which gets data from data base to create .course-item div but it all displays as one Column.. how can i fix it this is my ...
Rami's user avatar
  • 1
0 votes
1 answer
26 views

the gulp-pug doesn't work and say unexpected token "indent"

the gulp-pug doesn't work and say unexpected token "indent" see the images below gulp code and nodejs command prompt index.pug and nodejs command prompt package.json and nodejs command ...
M39ob Elzero's user avatar
0 votes
0 answers
46 views

How do I add structured data json script to Pug JS

I am trying to add in a script of json that is structured data for SEO into my Pug JS file. I am doing it the same way I do JavaScript with type="text/javascript", but it does not compile ...
Justin's user avatar
  • 556
0 votes
1 answer
25 views

A GET request is being fired off instead of the POST Request I've explicitly mentioned in axios

This is my login.js file which is responsible for client-side logging in functionality. My backend code is working fine as evident when I hit the api endpoint in postman and get my jwt successfully. ...
Anish Jha's user avatar
1 vote
1 answer
34 views

Express using default error handling page instead of view?

I'm following this MDN Express tutorial on creating a "Local Library" app, that uses Pug (Jade) as its templating engine. In this part of the tutorial, it details creating a controller for ...
mehkij's user avatar
  • 27
0 votes
0 answers
38 views

Mongoose data not showing on the web page as expected

I am creating a web app for keeping notes using mongodb, node.js, express and pug. When I load the home page the notes are arranged in order of date created. When I click the button to arrange the ...
AllThingsShiny's user avatar
0 votes
0 answers
52 views

How to add custom arabic font for pdf in pug file in node js project

I am using wkhtmltopdf libarary to convert pug file to PDF and in pug file I have text in arabic and english but I want specific font for arabic text to show in PDF file I tried it but it is giving ...
Sohaib Ul Hassan's user avatar
0 votes
0 answers
54 views

Linting for Pug and SASS inside Svelte files

My current setup is SvelteKit with preprocessors (TypeScript, Pug & SASS). I already have eslint, pug-lint & stylelint in place, but I can't make pug-lint and stylelint work inside .svelte ...
CRIS's user avatar
  • 346
-3 votes
1 answer
63 views

I am building an app where I want the admin to update any user who are displayed in the admin panel

I am a beginner and got stuck in this problem. I am building an app where I want the admin to update any user who are displayed in the admin panel by clicking on the update button at the bottom of the ...
Siraj Saifi's user avatar
0 votes
1 answer
80 views

Unable to access a property of an object using Mongoose

Sample data: { "_id": "ObjectId_for_Site1", "name": "Site 1", "address": "123 Reeganangam", "manager": { "_id&...
Ashok Kumar Maharajan's user avatar
0 votes
1 answer
35 views

pug how to set dynamic src

script. let thisfilefullname = document.URL.substring(document.URL.lastIndexOf('/') + 1, document.URL.lastIndexOf('.')); let imgurl = './img'; if(thisfilefullname.indexOf('localhost') == -1 &...
arachacha's user avatar
0 votes
1 answer
64 views

How to pass a HTML element as an argument to a pug mixin

I'd like to pass HTML through to my mixin. Something like this: mixin complexElement .container block header block content p This is some other content in the container. ...
mic's user avatar
  • 4,435

15 30 50 per page
1
2 3 4 5
213