Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Nov 22 13:19
    DinaTaklit commented #2085
  • Nov 20 11:22
    alexanderankin commented #3211
  • Nov 14 06:18
    thesksamim commented #407
  • Nov 14 06:16
    thesksamim commented #407
  • Nov 13 08:02
    codingthat commented #3225
  • Nov 12 20:28
    Krinkle commented #3225
  • Nov 12 20:27
    Krinkle commented #3225
  • Nov 12 20:26
    Krinkle commented #3225
  • Nov 12 07:59
    codingthat commented #3225
  • Nov 10 15:14
    Krinkle commented #3225
  • Nov 10 13:53
    ForbesLindesay commented #490
  • Nov 10 13:53
    ForbesLindesay locked #490
  • Nov 10 13:51
    ForbesLindesay labeled #3290
  • Nov 10 13:51
    ForbesLindesay labeled #3290
  • Nov 10 13:50
    ForbesLindesay commented #3290
  • Nov 10 13:47
    codingthat commented #3225
  • Nov 10 13:45
    ForbesLindesay closed #743
  • Nov 10 13:44
    ForbesLindesay closed #3225
  • Nov 10 13:44
    ForbesLindesay commented #3225
  • Nov 10 13:42
    ForbesLindesay closed #3291
r.js
@rjsAdmin_twitter
i dont see it anywhere as an example
yeah i can read english
example is to be found nowhere
image.png
Mason Mackaman
@Ursi
I've never used it, but my guess would be that {globals: ['variable']} would be the same as {variable}
r.js
@rjsAdmin_twitter
tried it but no, and it doesnt make sense, because what would "variable" do?
i was thinking "location" (as in windows.location.href
globals from the window object? donno
this is a doc issue, totally unclear, i also checked the code, "globals" is used somehow
r.js
@rjsAdmin_twitter
I created an issue
is this project maintained, there seem to be a shitload of issues
Jacob Bogers
@Jacob_Bogers_twitter
zup
chinogarga
@chinogarga
Hi
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 ?
brightwiths
@brightwiths
Hello, Bro and Sis. Looking guide: gulp pub install
Jae Hong Lee
@hongz1
Hi guys, I just installed pug and got warning that code-js version is deprecated. Is this known issue?
佐藤
@aPTdbHnqTFu9cEj_twitter
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
@leviwheatcroft

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
@leviwheatcroft
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
@mnjit20
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
@shwei
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
@3rChuss
Hi fellow developers, I have a question about how to inherit child blocks within children
Parent -> Child -> grandChild
//Parent
    body
        include partials/header
        block contenido
        include partials/footer
//Child
extends ../layout/index
block contenido
    // content from components
    block submenu
    // content from grandChild
    block pagina
//GranChild
extends ../index.pug
block pagina
    main.container.mt-2
        .col content bla bla bla
But this is actually not doing rendering
Am only getting the Parent, but content comes empty
Jesus Abril
@3rChuss
any handy hand here?
really apreccitted in avance
Konstantin Budasov
@kbudasov
Hey guys. Is there any ability to get amount of the transfered Children to Mixin via Block?
Konstantin Budasov
@kbudasov
Example:
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:
+form-row
   +input(is="email", required)
   +input(is="job-title", required)
VladimirUA
@VladimirUA
Hi! Can I use pug in Deno environment? Somebody has experience in integration pug to deno project?
Pranav Ballaney
@ballaneypranav
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:
p.
    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
L53c
@L53c

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

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

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

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"

            td 
                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?

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

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
@AnInternetTroll
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
@codymikol
I think that’s outside the scope of pug and more the server side renderer that processes pug
Luca Matei Pintilie
@AnInternetTroll
Thanks, I figured it out :thumbsup: