ics has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jugglinmike has quit [Quit: Leaving.]
ics has joined #nanoc
alerante has quit [Remote host closed the connection]
alerante has joined #nanoc
alerante has quit [Ping timeout: 255 seconds]
ics has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ics has joined #nanoc
prxq has joined #nanoc
alerante has joined #nanoc
alerante has quit [Ping timeout: 260 seconds]
ics has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
alerante has joined #nanoc
alerante has quit [Ping timeout: 252 seconds]
alerante has joined #nanoc
alerante has quit [Ping timeout: 244 seconds]
VitamineD has quit [Quit: Computer has gone to sleep.]
VitamineD has joined #nanoc
VitamineD has quit [Remote host closed the connection]
VitamineD has joined #nanoc
alerante has joined #nanoc
FernandoBasso has joined #nanoc
jugglinmike has joined #nanoc
<FernandoBasso>
I installed nanoc-toolbox but I get "NameError: uninitialized constant Nanoc::Toolbox".
<FernandoBasso>
I had to add it to my Gemfile...
<FernandoBasso>
So, I am trying to figure out how to use nanoc-toolbox to generate a TOC. Where should I place this line: <%= toc_for(@item, :collection_class => "nav nav-list toc") %> ?
<FernandoBasso>
I am trying to place it my page.md, but the generated pate just prints that line verbatim.
<FernandoBasso>
s:pate:page:
<guardian>
I want to have an integer that increments each time I invoke a helper
<guardian>
apart from a global variable, any idea?
<bobthecow>
FernandoBasso: if it's printing out <%= ... type things verbatim, that means you're not running the ERB filter on your item.
<bobthecow>
add `filter :erb` somewhere in your compile rules.
<bobthecow>
guardian: to what end?
<guardian>
bobthecow: I have <%= tabs '/_tab1/', '/_tab2/' %>
<guardian>
bobthecow: this is a helper that generates tabs, for twitter bootstrap
<guardian>
bobthecow: I need to be able to have <%= tabs '/_tab1/', '/_tab2/' %> twice in the same file
<guardian>
bobthecow: and the hrefs and ids generated to differ
<FernandoBasso>
guardian: That was the problem. Now, it doesn't generate the toc, though.
<guardian>
bobthecow: so each time tabs() is invoked, I want to increment an integer, ideally I want that per item but I guess that's not easily feasible since you can't attach metadata to items while compiling
<guardian>
bobthecow: I had to init the hash to -1 because I guess it goes through the helper when computing dependencies
<guardian>
bobthecow: I should confirm that with ddfreyne
<bobthecow>
yeah, he'd know better than me. but that's about what i'd do.
<guardian>
so yeah if I add puts to my tabs() helper printing @item.identifier, which is the identifier of the item calling the helper, then an item that uses the tab() helper twice gets 3 outputs
<bobthecow>
interesting.
<bobthecow>
oh, does that item have a <%= foo.compiled_content %> call or something?
<bobthecow>
if it does, it could be that it started rendering that item, then hit a dependency on something that wasn't yet compiled, then had to finish it off later.
<guardian>
yep that's the purpose of tabs, getting the compiled content of the partial items
<guardian>
that's likely what's happening
<guardian>
ddfreyne: I have a helper that takes the compiled_content of another item
<guardian>
ddfreyne: when that other item isn't compiled already, which exception can I catch?
<guardian>
ddfreyne: I want to catch the exception, act, then rethrow
alerante has quit [Remote host closed the connection]
jugglinmike has quit [Ping timeout: 248 seconds]
<ddfreyne>
guardian: What do you want to act on precisely?
<ddfreyne>
(It should not need to be caught)
jugglinmike has joined #nanoc
jugglinmike has quit [Read error: Connection reset by peer]