ddfreyne changed the topic of #nanoc to: 3.6.9 (apr 15th) | web http://nanoc.ws/ | repo http://bit.ly/XE6e3G | issues http://bit.ly/VfXaSV | forum http://ho.io/n-discuss | irclog http://irclog.whitequark.org/nanoc
stbuehler has quit [Quit: leaving]
stbuehler has joined #nanoc
alerante has quit [Remote host closed the connection]
alerante has joined #nanoc
alerante has quit [Ping timeout: 240 seconds]
alerante has joined #nanoc
louquillio_ has joined #nanoc
jugglinmike has quit [Quit: Leaving.]
alerante has quit [Remote host closed the connection]
alerante has joined #nanoc
alerante has quit [Remote host closed the connection]
alerante has joined #nanoc
alerante has quit [Ping timeout: 276 seconds]
relix has joined #nanoc
justicefries has left #nanoc [#nanoc]
<guardian> morning
<guardian> hmm tempted to give liquid a try instead of erb
<guardian> currently I have e.g. <%= image('foo', :align => center) %>
<guardian> not sure {% ... %} makes a difference in fact
<guardian> any opinion?
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
relix has joined #nanoc
cDlm is now known as VitamineD
alerante has joined #nanoc
alerante has quit [Ping timeout: 252 seconds]
<guardian> ddfreyne: I have Compass.add_project_configuration(File.join(File.dirname(__FILE__), 'compass.rb')) in _factory/Rules
<guardian> ddfreyne: whenever I change _factory/compass.rb nanoc doesn't see the changes
<guardian> ddfreyne: anything I can do?
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
relix has joined #nanoc
relix has quit [Client Quit]
alerante has joined #nanoc
alerante has quit [Ping timeout: 264 seconds]
alerante has joined #nanoc
jarr0dsz has joined #nanoc
jarr0dsz has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<tom[]> guardian: a similar question constantly recurs in php. but i've yet to come across a template system for which i can say, it actually makes things easier in the big picture. there's a reduction in visual ugliness for simple stuff but, otoh, <%= ... %> or <?= ... ?> is really not intolerable
relix has joined #nanoc
relix has quit [Quit: Textual IRC Client: www.textualapp.com]
relix has joined #nanoc
louquillio_ has quit [Remote host closed the connection]
<guardian> tom[]: agreed, I'll stick with erb, I'm not writing an app, erb can't do much harm
<ddfreyne> guardian: Difficult problem with _factory/compass.rb
<bobthecow> tom[]: the point of using a templating engine with php isn't that it makes things easier, it's that it enforces a constraint.
<ddfreyne> guardian: you could read the compass.rb file, hash it and stick it in config
<ddfreyne> That way there'll be an implicit dependency
<ddfreyne> (But still icky, I know)
<ddfreyne> Maybe nanoc needs a depend_on_files() thing.
<bobthecow> ddfreyne: you could fake "require" and use it for generating file dependencies?
<guardian> ah guys you're awake, right now I have the following problem: in layout/default.haml I wrote "- toc = toc(@item)" and my toc(item) helper generates a toc from item.compiled_content
<guardian> and this triggers a recursive compilation exception :/
<ddfreyne> guardian: You should use yield instead of item.compiled_content
<ddfreyne> guardian: a page cannot include itself because that'd be infinitely recursive
<guardian> toc(yield) ?
<ddfreyne> yes
<guardian> then that assumes toc(item) becomes toc(html) right?
<ddfreyne> guardian: Well, that'll only work in a layout, but I am assuming it is a layout
<ddfreyne> guardian: toc(@item, html) maybe… if you need other parts of the item apart from the content
<guardian> can't I do toc(rep) ?
<guardian> this is the toc helper in question: https://gist.github.com/gpakosz/0c279ec14d267fdd26b9
<ddfreyne> guardian: You can create a snapshot, and then use item.compiled_content(:snapshot => something)
<guardian> I debbuged it before trying to call it from my layout
<guardian> ah yeah snapshot, I tried with :snapshot => :pre with same failure
<ddfreyne> guardian: Maybe :pre is created after the ToC is built?
<guardian> the only place where I want call, and where I effectively call that toc() helper, is in layout/default.haml
<guardian> interesting: in layout.haml, I'm calling binding.pry to get an interactive session
<guardian> and when I call @item.compiled_content for then it complains
<guardian> Nanoc::Errors::UnmetDependency: The current item cannot be compiled yet because of an unmet dependency
<guardian> I didn't expect not being able to call compiled_content(:snapshot => :pre) on the very same item being laid out
<ddfreyne> guardian: When are you calling the toc helper? At what stage in filtering/layouting?
<guardian> I call the toc() helper from without layouts/default.haml
<guardian> items are filters, and layout 'default' happens last
<guardian> actually, after layout 'default' there's filter :rubypants
<ddfreyne> Hmmmm… I need to investigate that
<ddfreyne> guardian: Anywya, you can (and should) use `yield` in layouts to get the content of the previous phase
<guardian> item being laid out is /documentation/basics/analysis/
<guardian> and calling @compiled_content on @item complains about unmet dependency on /documentation/basics/analysis/
<guardian> which is the same item
<ddfreyne> guardian: There are some limitations with when you can call #compiled_content
<ddfreyne> It's a bit too strict at times
<guardian> ok
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<guardian> another thing surprising, @item_rep.snapshots is empty
<guardian> at the time @item is being laid out
<ddfreyne> guardian: you can use `yield` instead of @item.compiled_content
<guardian> yeah I understood :)
<guardian> still, I'm trying to give feedback about what I'm observing
<ddfreyne> @item_rep.snapshots being empty is weird though
<ddfreyne> Anyway, sleep time!
<guardian> good night
<guardian> I can reproduce @item_rep.snapshots being empty on a stock site created with create-site, with current master branch
<guardian> ddfreyne: so yeah @item_rep.snapshots only contains snapshots added to Rules, not :raw, :pre, :post and :last snapshots
VitamineD has quit [Ping timeout: 240 seconds]
VitamineD has joined #nanoc