Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Jan 16 20:25
    Hyubert opened #3207
  • Jan 15 14:10
    Shinigami92 opened #3206
  • Jan 14 13:13
    NicoBougrand opened #3205
  • Jan 14 11:29
    ForbesLindesay commented #3126
  • Jan 10 00:11
    kerimkaan edited #3204
  • Jan 09 23:55
    kerimkaan opened #3204
  • Jan 06 17:12
    acidjazz commented #1990
  • Jan 04 14:00
    ZaDarkSide commented #3130
  • Jan 04 13:55
    edoardoo commented #1990
  • Jan 03 17:53
    YasharF edited #3202
  • Jan 03 16:55
    zackschuster commented #3184
  • Jan 03 16:52
    zackschuster commented #3184
  • Jan 03 16:51
    zackschuster commented #3184
  • Jan 03 16:49
    zackschuster synchronize #3184
  • Jan 03 16:44
    Travis pugjs/pug#3184 errored (2137)
  • Jan 03 16:43
    zackschuster synchronize #3184
  • Jan 03 16:41
    Travis pugjs/pug#3184 errored (2136)
  • Jan 03 16:39
    zackschuster synchronize #3184
  • Jan 03 16:36
    Travis pugjs/pug#3184 errored (2135)
  • Jan 03 16:34
    zackschuster synchronize #3184
Ashraf Ahmed
@Ashr4f
Current output:
<h3 class="list-title">Title</h3>
<ul class="list">
    <li class="list-item"> Go to a(href="link.html") link </li>
</ul>
sorry for the spam, but these are the details
thanks for your help :pray:
Raka Widhi Antoro
@RakaWA

res.render('layout');
res.render('body');
res.render('footer');

Does anyone know how to overcome this? I can't call multiple .pug files

Tyler
@Tyler0722
Hey all
Mohamed Atef
@moatefdev
How to make an anchor tag <a> in new line when he is nested a paragraph <p>
?

in Pug.js, How to make something like that:

<div>
<a href="#">This is an anchor in new line inside a div</a>
</div>
but not like that:

<div> <a href="#">This is an anchor not in new line inside a div</a></div>
how to make the anchor in new line?

Tim Martin
@t-mart
Is there a good practice for including a pug file of mixins for usage in a document? Perhaps simply using the include keyword?
Kevin Palatzky
@kpalatzky
Someone online?
Can Pug used as alternative for htmltidy2?
Star Light
@starlight-tu_gitlab
htmltidy2 is a validation tool, pug is a generation tool. I don't think they are the same.
Mason Mackaman
@Ursi
is there a particular reason why an object syntax (like what is used for the style attribute) isn't used for data attributes?
Mason Mackaman
@Ursi
@t-mart I use include
Lucas Bersier
@bersLucas

Hello. Is there a way to do interpolation with iteration as well?

- var list  = [{name: 'a', age: 20}, {name: 'b', age: 21}, {name: 'c', age: 30}]
script.
  var people = [
  #{each person in list} // how?
]

My desired output would be

<script>
var people = [
 {name: 'a', age: 20}, {name: 'b', age: 21}, {name: 'c', age: 30}
]
<script>
Mason Mackaman
@Ursi
@bersLucas
- var list = [{name: 'a', age: 20}, {name: 'b', age: 21}, {name: 'c', age: 30}]
script.
    var people = #{JSON.stringify(list)};
Lucas Bersier
@bersLucas
My structure is circular, so it's not letting me use JSON.stringify, is there a way to use an iteration loop
Lucas Bersier
@bersLucas

using

script.
  var people = #{list}

results in var people = [Object object, Object object, ...], so the data is there

Mason Mackaman
@Ursi
@bersLucas I don't think the solution you're looking for exists. I think you're just going to have to write a function that takes an object and stringifies it in a way that works for your object, then use interpolation with that function and the object
perhaps try removing the circular references, JSON.stringifying it, and adding them back with some more string
or, if you're just trying to pass the data along, ask yourself if you even need the circular bits at all
r.js
@rjsAdmin_twitter
hello
what do "globals" in the options object do?
nowhere described
Mason Mackaman
@Ursi
Add a list of global names to make accessible in templates
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.