Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Oct 25 16:20
    OnlineInvisibleMan commented #3293
  • Oct 25 09:59
    duytran85 opened #3348
  • Oct 23 21:04
    OnlineInvisibleMan commented #3293
  • Oct 23 20:39
    OnlineInvisibleMan closed #3293
  • Oct 21 06:31
    Shinigami92 opened #3347
  • Oct 19 20:16
    edemaine synchronize #3346
  • Oct 19 20:14
    rollingversions[bot] commented #3346
  • Oct 19 20:13
    edemaine opened #3346
  • Oct 05 10:45
    RevealedFrom edited #3345
  • Oct 04 15:07
    RevealedFrom opened #3345
  • Oct 02 07:40
    justanightcorelover commented #3343
  • Oct 02 07:39
    justanightcorelover commented #3263
  • Sep 29 21:39
    matthewjumpsoffbuildings commented #3339
  • Sep 27 18:04
    dami-i commented #3336
  • Sep 09 13:05
    kdgyimah commented #3328
  • Sep 06 16:01
    janoside commented #2705
  • Sep 05 16:38
    fess932 closed #2799
  • Aug 30 13:07
    rollingversions[bot] commented #3344
  • Aug 30 13:07
    chbloemer opened #3344
  • Aug 27 11:51
    bashpro commented #2443
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:
istiyak-iroid
@istiyak-iroid
Please help! My html is being rendered inline. Because of this I'm having CSP (Content Security Policy) issues everywhere on my app.

HTML

doctype html
html(lang="en")
  head
    meta(charset='UTF-8')
    meta(name='viewport' content='width=device-width, initial-scale=1.0')

OUTPUT

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

EXPECTED OUTPUT

<!DOCTYPE html>
<html lang="en">
       <head>
            <meta charset="UTF-8">
            <meta name="viewport" content="width=device-width, initial-scale=1.0">
      </head>
</html>
Volodymyr
@dx1ded
image.png
image.png
Hi guys, why this code returning error?
David Ankin
@alexanderankin
i dont think it supports new lines like that, i think thats only in blocks
Garridog
@Garridog
Hi, my mac dont detect pug command
Carlos Orama
@SolAZDev
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
@alexp1917
hey so did pug just become actively maintained? like 6 commits merged a couple days back
Shinigami
@Shinigami92
red is sus..., uhm I mean yeah I noticed that too and I would be very happy if it did
Marta Blázquez
@marta-blazquez
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
@whoiscerebrocerberus
Hi guys...new here
Linda MacDonald
@lindamacdonald
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
Nathan Parikh
@nathanp
Hi there, Is there any way to get the current page URL in pug? I've got a static site and am trying to build out canonical tags that will grab the current page url
Trincheira - Comunicação Visual
@marvitphy
hey guys!!! :0
Rajasegar Chandran
@rajasegar
I made a CLI tool to generate Pug mixins from SVG files
https://github.com/rajasegar/svpug
Appreciate any comments/feedback :pray:
Burt Harris
@BurtHarris
Hello. I'm investigating pug, seems quite interesting, I want to understand the high-level syntax better. The readme, under Tutorials, points to https://cssdeck.com/labs/learning-the-jade-templating-engine-syntax. This page doesn't seem to be working for me, and still seems use the name 'jade'. Is there really some tutorial-like docs behind this?
2 replies
Chan Cheung Wai
@kenchan1604
hi
how to string to int in pug ?
Chris Pak
@Pakiavelli
hello is anyone here
i need help with pug please
const chris = require('help')
Javier Sanchez
@jsanch9
hello! Will pug be updated to use a newer safer version of lodash ?
├─┬ pug@3.0.2
│ └─┬ pug-code-gen@3.0.2
│ └─┬ constantinople@4.0.1
│ └─┬ @babel/types@7.11.0
│ └── lodash@4.17.20
Avinash Sharma
@avin1103
Hey everyone!
Is there a way to make the scrolling smooth?
especially when someone hits a button and it scrolls to another section within the page?