Questions tagged [pug]
Pug (formerly known as Jade) is a robust, elegant and feature-rich template engine for Node.js.
6,468
questions
1
vote
0
answers
105
views
TailwindCSS Media Queries Not Working in Pug Template
I'm facing an issue with TailwindCSS media queries when using them in a Pug template. The media query styles aren't being applied as expected.
The rendered HTML is:
<div id="caracteristica&...
3
votes
1
answer
657
views
Using Square Brackets in Class Names with Pug and Tailwind CSS
I'm trying to use both Pug and Tailwind CSS for a project. I encountered an issue when trying to utilize Tailwind's custom values syntax (using square brackets) in a Pug template.
I understand that h-[...
0
votes
0
answers
50
views
how do I wait for data to be fetched in javascript? [duplicate]
so i am fetching data from mongodb atlas and then store it in an array, then i pass it in pug , but issue here is what i think is that pug file is rendered before data could be fetched .
here is the ...
0
votes
0
answers
30
views
How using bootstrap styles with jade framework? [duplicate]
I use jade framework. In my jade file view.jade I have strings:
| #{mytext.text.slice(0, 30) + '...'} // The text in my table that needs to be displayed all the time
.tooltip-inner
| #{mytext....
0
votes
1
answer
74
views
Pug - Is there a way to get the output markup from a pug mixin as a escaped markup?
The idea is to have the possibility to use the same mixin used to build some componet for a project also to get the html output to use inside <code> tags to build a small documetation.
So here I ...
0
votes
1
answer
54
views
how to fix csp bug with pug, sass, gulp
This is my project structure: enter image description here
My gulpfile.js :
const gulp = require("gulp");
const pug = require("gulp-pug");
const sass = require('gulp-sass')(require(...
0
votes
0
answers
32
views
kss-node multiple markup on page?
is there a way so show multiple markup on a page in kss-node? Like a overview page?
Normal:
// Whatever
//
// Lets show Whatever
//
// Markup: atoms/2.01.whatever/_2.01.1.whatever.html
//
// ...
0
votes
0
answers
342
views
How to fix Indent error in pug + Nuxt 3 + vite?
I have this error
when i did indent in template vue,
but without indent it work correct and i don't get the error
> > 2| WrapperGlobal
> -------^
> 3| v-container.fill-height
&...
0
votes
1
answer
342
views
Global interceptor, response mapping and library specific responses in NestJS
I'm trying to use "library-specific" response objects alongside a global interceptor in NestJS, but it's not working and as I understand from the documentation, this is expected:
Response ...
0
votes
0
answers
226
views
Jest for Angular with Pug throws "SyntaxError: Unexpected token '<'" at templateUrl
I'm changing a very large electron+angular+pug project to use Jest instead of Karma+Jasmine.
These are my package versions:
Node: 15.14.0
"@angular/cli": "11.2.10",
"jest"...
-1
votes
1
answer
28
views
how use setInterval in pug?
i want make a clock using pug and nodejs
node
let clock
function getClock() {
~
clock = `${hours}:${minutes}:${seconds}`;
}
app.get("/main", (req, res) => {
~
res.render(&...
0
votes
1
answer
54
views
is there a way to pass rendered variables from pug templates to client side JS files?
I am making a small project with Node.js, Express and Pug templates. I am passing data with res.render('template', {processedData}); to pug template where I have two graphs created with Chart.js. I ...
0
votes
1
answer
52
views
Pug cannot find installed Highlight.js JSTransformer filter
The documentation says I just have to install the filters via npm in order to use them.
If you want to be able to use filters in your Pug template, you would first make sure that these features are ...
0
votes
0
answers
560
views
Reference Error when Importing TypeScript Module into JS File
I am currently facing an issue while introducing TypeScript into a portion of my project. My project uses CommonJS for module management and Pug as a template engine. I'm attempting to import a class ...
1
vote
1
answer
49
views
Multiline blocks in tag interpolation
I'm using Pug templates to write articles in HTML and have run into issues with extremely long lines when interpolating tags into plain text. For example:
blockquote(cite='https://lwn.net/Articles/...