All Questions
134
questions
0
votes
1
answer
30
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 ...
1
vote
1
answer
122
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 ...
0
votes
1
answer
64
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
65
views
How can I generate static files from a pugjs project correctly?
I work with a site that was builded using Pugjs as a template engine and I've been experiencing an error when I try to generate the static files using the command 'npm generate'. The projecto also has ...
1
vote
1
answer
867
views
Gulp: How to compile multiple .pug files into several index.html files inside folders
I'm learning to use gulp and I decided to use pug for writing all my html.
The thing is that have this folder structure:
src/pug
├── base
│ ├── mixins.pug
│ └── variables.pug
├── components
│ ├──...
0
votes
1
answer
139
views
MIXIN_WITHOUT_BODY - pug mixins
I am new to Pug! been trying to create a simple mixin for nav-item and also am using Gulp 4 for compiling with Gulp-pug package! It keeps on showing error 'PUG:MIXIN_WITHOUT_BODY' I googled it but ...
4
votes
0
answers
593
views
How to render html with pug at runtime in a project served by gulp?
I am new to web development, and am using gulp for my project, which serves index.html page at build time.
I am using pug as a template for generating html.
gulfile.js
const bundler = () => {
...
1
vote
1
answer
506
views
How can I get a value from index.html and use it to render a second template after parsing JSON file?
I'm trying to wrap my head around gulp and modern JavaScript bundling.
The application is pretty simple:
A html page is displayed to the user, where he must check a few radio buttons.
User then ...
0
votes
1
answer
1k
views
Which options can i use with gulp-pug?
I have used gulp.js for a while, and while using the gulp-pug package I don't know which options can I use.
Let's use sass as an example:
// STYLES TASK
`gulp.task('style', function() {
return ...
0
votes
0
answers
139
views
Pug convert to HTML, how convert with line break?
Pug convert in this HTML code:
<ul class="header__menu-list" id="header-menu">
<li class="header__menu-item"><a class="header__menu-link" href="catalog.html">Ювелирные изделия&...
1
vote
0
answers
559
views
Use Pug (jade) as front end templates with express js
I have an express app that loads my pug (jade) templates to do server side rendering. There are a few points in my site where I want to render a view client side. For example, most of a page loads ...
1
vote
1
answer
281
views
pug/jade & gulp-merge-json line break
I'm using pug/jade with gulp data & gulp-merge-json. I can't find a way to insert line break in my Json.
I have tried to insert in the json :
\n
\"
\\
\/
\b
\f
\r
\u
None works. I managed to ...
2
votes
1
answer
150
views
Pug tag names with at-signs/asperands (@)
I use pug to write .json files (compiled with gulp, gulp-pug and gulp-xml2json).
It works really well normally, but I can't figure out how to get it to handle the asperands (@) necessary for json-ld ...
3
votes
1
answer
1k
views
gulp-pug: compile new on changed files only (case with "includes" and "extends")
Consider the following file system:
📁 pug
test1.pug
test2.pug
📁 partials
partial1.pug
With gulp task
gulp.task('pug', () => {
return gulp.src('pug/*.pug')
.pipe(pug())
....