6,441 questions
- Bountied 0
- Unanswered
- Frequent
- Score
- Trending
- Week
- Month
- Unanswered (my tags)
0
votes
0
answers
40
views
Vite/Vituum Build Fails with Persistent "Error parsing body of the with expression" (Pug Indentation/Compatibility Issue)
I am working with a Pug/SCSS template using Vite and the Vituum plugin, and I am consistently hitting a build error that seems to be related to the Pug parser's handling of template logic.
Despite ...
0
votes
0
answers
34
views
"Cannot read properties of null (reading 'length')" and Pug not rendering (shows raw Pug text instead)
I’m using a Vite + Vituum + Pug + SCSS template (based on the teacher’s repository vite-pug-scss-template) for a web-technologies lab.
When I run npm run dev, the dev server starts, but:
The browser ...
1
vote
1
answer
57
views
JADE pug template engine nested layout
is there any way to have multiple nested layouts in JADE?
for example:
master.pug then master-spec.pug then homepage.pug
what I'm trying to achieve - is to add a canonical meta tag to each page in the ...
-2
votes
1
answer
83
views
pug template how to use a label of a hidden file input to upload file?
I use pug template with Node.JS. How can I use a label to hide file input control and use the label click to upload file? I have done the same thing using bootstrap but not sure about about to ...
0
votes
2
answers
73
views
Alias for pug mixin
Is it possible to create aliases for pug mixins? I have a library of generic mixins for a project, but then have another mixin that when I call it I want to modify the behavior of some of the generic ...
3
votes
1
answer
141
views
Cannot display image in email template created with pug which is sent with nodemailer
My server.js contains following code to serve the image on server
app.use(express.static('public'));
app.use('/images', express.static('images'));
All the images are stored in '/public/images/' dir ...
1
vote
2
answers
66
views
How to better append html response content to a Node.JS pug template?
My Node.JS app makes an external API call which returns markdown response. I then use https://github.com/showdownjs/showdown toconvert it to HTML and append it to a scrollable list in the following ...
1
vote
1
answer
68
views
How to post both text and image to backend with Node.JS PUG
I have the following PUG template:
extends layout
block append head
link(type='stylesheet', href='/stylesheets/mystyle.css', rel='stylesheet')
block layout-content
#chat-app
#chat.has-text-...
0
votes
1
answer
154
views
Refused to apply inline style because it violates the following Content Security Policy
I was trying to use inline styling, but suddenly the console is giving this error and ain't letting me do one important task.
each review in tour.reviews
.mc_reviews
...
1
vote
1
answer
64
views
Pug template not working with nuxt variables
I am trying to run a simple pug for loop inside of my nuxt app.
I installed https://www.npmjs.com/package/vue-pug-loader by running the commands, and the syntax seems to work:
<template lang="...
0
votes
1
answer
41
views
Method to Utilize NodeJS Array from Sequelize into the Script Tag of a Pug Template
So I am having an issue with figuring out how to get the variable that is passed from NodeJS into my Pug Template into a variable within the Pug Template's Script tag. The issue is that it is a ...
0
votes
1
answer
333
views
How do I get ESLint 9 to work with pug templates?
My stack consists of Pug templates, JS (Jquery), yaml and stylus files. I am struggling to get ESLint to work with Pug. I have installed the eslint-plugin-pug and added it to the plugins in the eslint ...
2
votes
2
answers
74
views
Express route fires a second time
I have a program which I have reduced to almost nothing, and still get the problem that, if I include a HTML5 Video construct, then the initial route gets called twice.
app.js
var express = require('...
1
vote
1
answer
28
views
pug creates newline character in mixin when using block keyword
This example
mixin article
div
if block
block
+article Test
When inspecting the code it looks like one space, but if we start editing the text node we will see this:
<div>Test
...
1
vote
0
answers
92
views
How can I use pug in angular esbuild, using @angular-builders/custom-esbuild
I am using angular 17, I use pug template, current, I use ng-cli-pug-loader to load pug.
I want to transfer to esbuild, so after researching I know that esbuild can config plugin. Can I use plugin to ...