Where communities thrive

  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
Repo info
  • Apr 11 22:35
    benjaminbhollon commented #3324
  • Apr 11 11:27
    creativemacmac commented #3324
  • Apr 11 10:48
    creativemacmac commented #3324
  • Apr 11 00:33
    benjaminbhollon commented #3322
  • Apr 11 00:32
    benjaminbhollon commented #3322
  • Apr 11 00:16
    benjaminbhollon commented #3324
  • Apr 09 05:43
    trasherdk commented #3325
  • Apr 07 08:09
    Hackcr opened #3325
  • Apr 07 06:58
    creativemacmac opened #3324
  • Apr 06 23:55
    gibsonf1 opened #3323
  • Apr 02 15:49
    anton-p-v closed #2801
  • Mar 30 05:50
    anurat closed #3307
  • Mar 30 05:50
    anurat commented #3307
  • Mar 22 12:59
    fares57 commented #2426
  • Mar 19 18:32
    ajbraus opened #3322
  • Mar 19 07:30
    Shinigami92 opened #3321
  • Mar 15 15:53
    rollingversions[bot] commented #3318
  • Mar 12 06:57
    logico-philosophical commented #3312
  • Mar 08 14:26
    trasherdk commented #3320
  • Mar 08 09:14
    jeromew closed #3320
Mi name es Renzo and I amworking in a proyect mvc c# with pug
but is not core
but my app itswork fine in localhost butwhen I deploy my app in a hosting I cant visualize me views ?
Hello, Bro and Sis. Looking guide: gulp pub install
Jae Hong Lee
Hi guys, I just installed pug and got warning that code-js version is deprecated. Is this known issue?
Hi,When I type sudo npm i -D gulp-pug in the terminal, it returns "ERR! TypeError: Cannot read property 'latest' of undefined". Where is the cause?
I also typed command sudo npm install pug-cli -g,
sudo npm install -g pug,
sudo npm install pug.
Levi Wheatcroft

Hey, when trying to use the &attributes syntax I'm getting an error:
Cannot read property 'indexOf' of undefined on line 1 at pug_attr (/mnt/c/Users/levi/git/envoy-ubu/node_modules/pug-runtime/index.js:141:25)

index.js:141 is here and pug_attrs is called from here

On line 141, I can't figure out how val could be undefined, if it were, then val == null on line 129 would be true so pug_attr would return ''.
Levi Wheatcroft
oh wait I figured it out...
so something like this:
render('input(name=name value=value)&attributes({ foo: 'bar' })', { name: 'example', value: undefined })
will throw this error.
Manjeet Verma
Hi, could anyone help with this error. "Error: Failed to lookup view "index" in views directory "views"
I have deployed a Express API, which is in typescript and using serverless framework.
Shang Heng Wei
Hi pug experts, I tried to call pug.compile('extends /extends/template.pug\n\nblock campaign_title\n...'). How do I include the referenced extend file or load extend content in compile call? Thanks!
Jesus Abril
Hi fellow developers, I have a question about how to inherit child blocks within children
Parent -> Child -> grandChild
        include partials/header
        block contenido
        include partials/footer
extends ../layout/index
block contenido
    // content from components
    block submenu
    // content from grandChild
    block pagina
extends ../index.pug
block pagina
        .col content bla bla bla
But this is actually not doing rendering
Am only getting the Parent, but content comes empty
Jesus Abril
any handy hand here?
really apreccitted in avance
Konstantin Budasov
Hey guys. Is there any ability to get amount of the transfered Children to Mixin via Block?
Konstantin Budasov
I have parent Mixin +form-row and I need to know how much +inputs (or other blocks) he received inside of it. So, it should be 2 in this case:
   +input(is="email", required)
   +input(is="job-title", required)
Hi! Can I use pug in Deno environment? Somebody has experience in integration pug to deno project?
Pranav Ballaney
Hi, is it possible to interpolate a mixin? Basically I want to create in-page links within a large block of text, for citations. So it would be great if I could do something like:
    lots of multiline text here #{+intext(1, "Cooper et al.")} some more text
and then +intext() would add a link to a citation mentioned at the bottom using the citation number provided as argument

Did anyone met this situation where the data rendered is surrounded by < and >

As it seem like the pictures are not being linked, please find the links below;

View: https://drive.google.com/file/d/1sIPhikZVT3mYxpmt-fLlDY8iat4R2bAN/view?usp=sharing
Code: https://drive.google.com/file/d/19kEhXWHSseJkMNrAmPc8pwK-3R4tq7nf/view?usp=sharing
Dependencies: https://drive.google.com/file/d/1zpfkk69d02ePQuRQEOqDXPOQMPYoF_uQ/view?usp=sharing

The above have been sorted, | <- this operator was missing in the line 14
AmirHossein MOjvar
Hi guys, I have a little question, How can I use pug in deno ? thanks.
Hi how to use carousel using the dart pug?
Hi everyone! Been using pug -> jsx for a while. Love it!
Yair Fried

Hi, I'm very new to pug. I'm trying to format a cell in a table where the cell.style should return background-style: red and cell.text is "foo"

                span(style="#{cell.style}") #{cell.text}

But this resolves to <td> <span style="#{cell.style}">foo</span></td>

Why doesn't span extrapolate the value of cell.style?

yeetmanboi Oh I thought this was a pug server
David Ankin
if anyone can offer advice on how to share templates between apps with npm packages, that would be super appreciated.
David Ankin

i actually see that you can customize this here: https://pugjs.org/api/migration-v3.html but thats a weird place to put the plugin docs and i dont see it anywhere else. I opened a ticket for this.

if anyone wants to either close it with the link to the docs, or tell me how to make them, or make the plugin docs themselves, here's the issue: pugjs/pug-en#31

Luca Matei Pintilie
Hi, does anyone know how I can pass optional options to pug? I want to do something like res.render("page", {message: "Warning: ohno"}); but I don't want message to be required at all times. Is it possible to achieve this?
Cody Mikol
I think that’s outside the scope of pug and more the server side renderer that processes pug
Luca Matei Pintilie
Thanks, I figured it out :thumbsup:
Please help! My html is being rendered inline. Because of this I'm having CSP (Content Security Policy) issues everywhere on my app.


doctype html
    meta(name='viewport' content='width=device-width, initial-scale=1.0')


<!DOCTYPE html><html lang="en"><head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0">...


<!DOCTYPE html>
<html lang="en">
            <meta charset="UTF-8">
            <meta name="viewport" content="width=device-width, initial-scale=1.0">
Hi guys, why this code returning error?
David Ankin
i dont think it supports new lines like that, i think thats only in blocks
Hi, my mac dont detect pug command
Carlos Orama
Hello, could I ask for help on an Angular tempalte? Im trying to pass down an array object as a paramter to a mixin
Alex Pavlovich
hey so did pug just become actively maintained? like 6 commits merged a couple days back
red is sus..., uhm I mean yeah I noticed that too and I would be very happy if it did
Marta Blázquez
Hi! could you please let me know if it is possible to include an image in pug proyect via URL instead folder path?
Thank you in advance
Somebody have some complet guide to share? All that I can find is to short and incomplete.
cͥërͣeͫ多ro Cër多ërนs
Hi guys...new here
Hey there guys hope you are all doing well :) SO I am on a course that uses pug.js and must admit I LOVE pug, so got curious to learn more about it :) I went online to see a production site that uses pug, but I couldn't find any info...can you guys tell me about a site that uses pug in production. I would like to check out the load speeds of it