ddfreyne changed the topic of #nanoc to: 3.6.4 (may 29th) | 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
KK4MGV has joined #nanoc
louquillio has quit [Remote host closed the connection]
jugglinmike has quit [Quit: Leaving.]
louquillio has joined #nanoc
VitamineD has quit [Quit: VitamineD]
Guest68804 has quit [Quit: Reconnecting]
stbuehler has joined #nanoc
VitamineD has joined #nanoc
jugglinmike has joined #nanoc
VitamineD has quit [Ping timeout: 268 seconds]
jadd_ has joined #nanoc
alerante has joined #nanoc
Evolution has left #nanoc ["http://www.bit-integrity.com"]
jadd_ has quit [Ping timeout: 240 seconds]
VitamineD has joined #nanoc
pavelkunc has joined #nanoc
alerante has quit [Read error: Connection reset by peer]
alerante_ has joined #nanoc
alerante_ has quit [Read error: Connection reset by peer]
alerante has joined #nanoc
alerante has quit [Read error: Connection reset by peer]
alerante_ has joined #nanoc
alerante_ has quit [Remote host closed the connection]
pavelkunc has quit [Quit: Leaving.]
pavelkunc has joined #nanoc
rift has joined #nanoc
<rift> Hello, just wondering if anyone knows a way to enable a layout on all html pages within content, with the exception of one subfolder in content? For instance, I have a project that contains a lot of separate sites and all but one of those websites make use of one layout. The ones that doesn't uses a different layout.
<bobthecow> rift: put a rule (or set of rules) for that folder above the other rules so they match first?
<rift> Oh does ordering matter? I'll give it a shot.
<bobthecow> yeah, items are compiled and routed using the first rule that matches.
<bobthecow> so you put general rules last, and specific rules above them.
<rift> Oh ok. Here's what I have so far.
<rift> compile '*' do
<rift> if item.binary?
<rift> filter :erb
<rift> end
<rift> layout 'foo'
<rift> end
<rift> compile '/bar/*' do
<rift> unless item.binary?
<rift> end
<rift> filter :erb
<rift> layout 'bar'
<rift> end
<bobthecow> yeah. flip those.
<bobthecow> more specific rules need to go first.
<rift> oh ok.
<rift> it didnt seem to work. it ends up compiling both the layouts for the one page. is there a way to restrict it to the bar layout?
<bobthecow> what?
<bobthecow> nanoc only matches one rule per item.
<bobthecow> can you paste your exact rules file to a gist or something?
<rift> ya one sec
<bobthecow> i don't see anything super problematic.
<bobthecow> none of your css or js files inside your special subdirectories will be rendered properly.
<bobthecow> those rules need to go first of everything
<bobthecow> (*/css/*)
<rift> ok
<rift> Unfortunately I still have the "compile *" and the "compile '/wasc/*'" layout being rendered on one page. is there a way to exclude the wasc one from the * one?
<bobthecow> they're not, i promise.
<bobthecow> there's something else going on.
<rift> oh ok. hmm :/
<bobthecow> also, those sections are all basically the same... I'd do this instead: https://gist.github.com/bobthecow/bcdf42ffffd1d72d30df
<bobthecow> but as far as why you're getting things you don't expect in the compiled results... are you referencing .compiled_content anywhere?
<rift> well thats much cleaner. thanks. ill check
<rift> doesnt look like it
<bobthecow> any chance you have multiple yields in your layouts?
<bobthecow> do any of your layouts include other layouts?Q
<rift> yes I believe so. all projects except wasc should have the compile '*' do layout and then their own within that one.
<bobthecow> and how are you doing that?
<rift> Ha. I am calling <% render 'layoutname' do %> within each consecutive layout
<rift> well that was easier than I thought...
<bobthecow> rather than doing that (in any layout) you should use multiple layout calls in your rules.
<bobthecow> sections.each do |name|
<bobthecow> compile "/#{name}/*" do
<bobthecow> layout name
<bobthecow> filter :erb
<bobthecow> unless item.binary?
<bobthecow> layout 'biola'
<bobthecow> end
<bobthecow> end
<bobthecow> end
<rift> hmm that would be preferable. Awesome, thanks for the help :)
<bobthecow> no problem.
<bobthecow> i've got a site with some items that get 5 layouts applied :)
<rift> lol wow.
rift has quit [Quit: Leaving.]
pavelkunc has quit [Quit: Leaving.]