Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
Ricardo Mendes
@locks
yes, there are some whitespace-related specs
Justin Hileman
@bobthecow
Mostly around “standalone lines”, basically what happens when a line only includes whitespace and a tag that’s not interpolated.
And indenting partials.
Mike Henriquez
@mikehenriquezf
hello guys, how can i make something like this, if i have the data display in <li>?? http://i.imgur.com/hvr38uV.jpg
Justin Hileman
@bobthecow
Can you give us more context?
Mike Henriquez
@mikehenriquezf
i have an array with 10 articles, i want to display them but in the middle of the list i want to display a 300x250 ad
5 articles, Ad, 5 more articles
Justin Hileman
@bobthecow
@mikehenriquezf Is it always 5 / ad / 5?
split your articles list in half (in code, before it goes to the template). Then do {{# first_set }}{{> article }}{{/ first_set }} {{> ad }} {{# second_set }}{{ > article }}{{/ second_set }}
Jakob Damgaard Møller
@jakobdo
Can i get this output with mustachejs: https://dpaste.de/itfU ?
Justin Hileman
@bobthecow
You'll need to prepare your data first.
Jakob Damgaard Møller
@jakobdo
So Mustache cant do the "ifchanged" thing?
Justin Hileman
@bobthecow
nope, because that’s logic, and mustache doesn’t logic ;)
Jakob Damgaard Møller
@jakobdo
Thanks.
Frank Pinto
@frankpinto
hello all!
Trying to get rails to use mustache as the templating engine when it generates scaffolds, etc., anybody know how?
google gave me a couple leads but if anybody here's done it before, I'd appreciate the help :)
Ricardo Mendes
@locks
hey @frankpinto, I'm not sure you can?
Richard Doe
@rwd
Is there any way to use Rails fragment caching with Mustache?
Leonardo "Alemax" Fonseca Ferreira
@leonardoalemax
hello guys, i`m trying to render a template like this:
```<div id="{{renderwithmustach}}" ng-click="{{letangularrender}}" > ````
how to not render the angular tag?
just the mustach one?
Justin Hileman
@bobthecow
@leualemax mustache lets you change delimiters to one that doesn't conflict:
{{=<% %>=}}
<div id="<% renderwithmustache %>" ng-click="{{ letangularrender }}">
John Arnold
@Surreal9
Does anyone know why trying to render a variable that contains a url, it hides the "http:" part and only shows "//restoftheurl.com"? even when using triple braces to cancel escaping? ie {{{myUrl}}}
Ricardo Mendes
@locks
@Surreal9 that's the first I've heard of
Selwyn
@Siilwyn
Does anybody know if a npm package exists that let's me pass a partial, views (and data) directory to it and in turn outputs html to a given directory?
Ricardo Mendes
@locks
@Siilwyn I don't think so
I suggest a bash script to feed the necessary files to the mustache binary
Selwyn
@Siilwyn
@locks :smile: never expected an answer
hmm that doesn't sound ideal since I'm using npm scripts. Would that be a long bash script?
John Arnold
@Surreal9
@locks I think it's an express view engine thing.. I noticed switching from Mustache I still saw the same behaviour with another engine
Selwyn
@Siilwyn
@locks I wrote a npm package to do it: https://npmjs.com/mustache-prestatic
Frodi
@Frodi2_twitter
Hi guys, i have a big Problem. Input : {{{text}}} expected output {text}. i need to have braces around my {{text}} template. how to do this?
Justin Hileman
@bobthecow
{{=<% %>=}}{<% text %>}<%={{ }}=%>
@Frodi2_twitter ^
Andrew Sharp
@ags799
given a list of integers [1, 2, 3] and an operator +, could i use mustache to produce 1 + 2 + 3? something like {{#list}}{{integer}}+{{/list}}?
andrew
@drewish_twitter
Curious if the ruby lib is still maintained. I'd love to get a review for mustache/mustache#240
Hugo Peixoto
@hugopeixoto
@drewish_twitter the fix looks good to me, I commented on the issue
JL
@j3nlou_twitter
Hi
I'm using gulp-mustache. I want to render each page with a specific data like a JSON file for example. How can i do this task?
Now my task is like that :
gulp.task('partials:assemble', () => {
  return gulp.src(`${PATHS.SRC}/*.html`)
    .pipe(
      mustache()
    )
  .pipe(gulp.dest(PATHS.DIST));

});
Logen
@Logenleedev

Hi guys! I try to practice Mustache js template engine. Here is my codepen project

https://codepen.io/Riederlee/pen/RvKrpr

I do not know why I did the exact same code with the tutorial site. But nothing shows up. Anyone can help me?

TeeKen Lau
@teekenl
is that way to perform addition for mustache attribute before rendering in ruby?
Martin Skou
@martinskou
whats the rules for newlines and removel of newline chars in templates? cannot find it described in the specs.
sandeep s
@sandeep0077:matrix.org
[m]
HI
I need help in mustache template
I am using this in aws elasticserach service for alerting
any one here??????????????????
martin