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
2 answers
59 views

How to make three texts position on top of each slots respectively?

Description I am developing a random name picker web app and I'd like to know how to make three texts positioned on top of each slot and aligned center in each slot simultaneously. The current image ...
loupdaniel's user avatar
0 votes
1 answer
87 views

express locallibrary tutorial author names missing from book list

I'm trying to build some knowledge in back end development (because I need it!) after spending a few years on front end, and after a short intro' into Basic Node and Express from the fantastic ...
Fishbite's user avatar
  • 192
0 votes
0 answers
247 views

How to integrate Vite into an existing old express app with pug templates

I have an old code that uses Express and renders HTML with pug. It uses plain js files and imports them like: script(type='text/javascript' src='js/test.js') They use jquery all around those js files. ...
H3lltronik's user avatar
0 votes
0 answers
38 views

Cant use pug module with parcel?

I am trying to rendering the content with the pug template but I cant import the pug modules into this file, i'm using parcel to bundle all the js file also. Here is the code: import html from ".....
NtotheKtotheL's user avatar
2 votes
1 answer
134 views

How can you implement new @for @if syntax introduced in Angular 17 in PUG?

I have been using PUG in my Angular application and I like the new syntax introduced in Angular 17 regarding @for and @if, replacing *ngFor and *ngIf. I wasn't sure how to implement this via PUG. ...
Jason's user avatar
  • 907
0 votes
1 answer
89 views

How do I host a website that contains PUG templates in a sub-folder instead of an index.html file in the root directory of the project folder?

I want to host my website for free but my files are in PUG and not HTML. From what I know, I need to have an index.html file that too in the root directory to be able to host the website since that ...
Arpita's user avatar
  • 1
0 votes
0 answers
37 views

Rendering a new pug template fails in ExpressJS

I'm making a sort of basic search engine and I have 2 pug template files called index.pug (the default search page) and search.pug (search results page) and an expressjs file called app.js that ...
Edward's user avatar
  • 1
0 votes
1 answer
107 views

Pug template won't render after redirecting to new url

Whenever I attempt to redirect to a new url with query params and then try to render it after, it doesn't want to render. If i take the additional query params off, the page will render just fine. ...
Priest's user avatar
  • 1
0 votes
0 answers
106 views

Pug add scripts from includes before the closing body tag

I have some pug templates, which use the include functionality. For example I have a index.pug and a detail.pug, which act as the parent layouts. body | I am the index.pug include my_partial | ...
Zeus's user avatar
  • 856
0 votes
1 answer
68 views

Cannot see anything in the console when trying to debug a login function

I am using Node.js with Express as well as Pug templates. I have a login function that is not working. I am trying to debug the code by logging the credentials (email and password) to the console. But ...
Leon's user avatar
  • 3
0 votes
0 answers
22 views

Why pug is not rendering?

these is snip shoot of the root route As you can see from the image, when ever I try to access the root which is "localhost:3000/" is not displaying anything. I don't see any errors what's ...
Filmon Tewelde's user avatar
0 votes
0 answers
49 views

How do I create an Angular Project using the CLI that uses Pug3?

I created a project using the following... ng new my-app cd my-app npx ng add ng-cli-pug-loader But I get .../my-app on branch main > npx ng add ng-cli-pug-loader npm WARN cli npm v10.2.3 does not ...
Jackie's user avatar
  • 23.1k
0 votes
0 answers
27 views

pass form value in PUG as a paramater in onclick function

I am trying to pass a value from a form to use as a parameter in a function in a onclick button. But im not sure how to get the value. This hardcoded example works: button.btn.btn-glider(onclick=...
user6086008's user avatar
0 votes
1 answer
32 views

PhpStorm navigate to style in PUG

In my project I use PUG and SCSS. When clicking a class name in PUG file I expect PhpStorm navigate me to appropriate style definition in a SCSS file. For example, in code p.text-white-75.mb-4 ...
Alexey's user avatar
  • 3,182
0 votes
0 answers
28 views

Nodejs pug form button not redirect and submit

When I fill in the information in the form in the add-product.pug file, the information should appear as a card on the home page and should be returned to the "/" directory as a redirect, ...
emir's user avatar
  • 1

15 30 50 per page