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
jadd_ has joined #nanoc
jadd_ has quit [Client Quit]
bghost has joined #nanoc
alerante has joined #nanoc
bghost has quit [Ping timeout: 264 seconds]
jugglinmike has quit [Quit: Leaving.]
_whitelogger has joined #nanoc
cDlm has quit [Ping timeout: 256 seconds]
cDlm has joined #nanoc
cDlm has quit [Ping timeout: 256 seconds]
cDlm has joined #nanoc
cDlm has quit [Ping timeout: 264 seconds]
cDlm has joined #nanoc
alerante has quit [Remote host closed the connection]
cDlm has quit [Read error: Connection reset by peer]
cDlm has joined #nanoc
yogsototh has joined #nanoc
cDlm is now known as VitamineD
skroon_ has quit [Ping timeout: 240 seconds]
skroon has quit [Ping timeout: 264 seconds]
VitamineD has quit [Read error: Connection reset by peer]
cDlm has joined #nanoc
cDlm has quit [Read error: Connection reset by peer]
jeremyjarvis has joined #nanoc
skroon_ has joined #nanoc
skroon has joined #nanoc
dbast has quit [Quit: '']
dbast has joined #nanoc
skroon_ has quit [Quit: leaving]
jeremyjarvis has quit [Quit: jeremyjarvis]
jeremyjarvis has joined #nanoc
jugglinmike has joined #nanoc
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]
skroon has quit [Ping timeout: 276 seconds]
<jugglinmike> Hey all
<jugglinmike> Is there a way to use a filter from within a layout?
<jugglinmike> for instance
<jugglinmike> I'd like for this include
<jugglinmike> <%= @item[:register] %>
<jugglinmike> to be processed with ERB
<jugglinmike> In other words, the string stored in `@item[:register]` is itself an ERB template
<summatusmentis> at the end of my Rules file, there's the line: layout '*', :erb
<summatusmentis> but I'm not sure how deep that goes
<summatusmentis> I realized as I was saying this that maybe it doesn't address your issue
<summatusmentis> you might need to compile the item using erb first
<bobthecow> yeah, no. things don't double-evaluate like that. it's just dangerous :)
<bobthecow> you can prolly use the filtering helper.
<bobthecow> something like
<bobthecow> <% filter :erb %><%= @item[:register] %><% end %>
<bobthecow> it might need to be <%= filter ... i don't know offhand.
<bobthecow> try both.
<bobthecow> jugglinmike: ^
jeremyjarvis has quit [Quit: jeremyjarvis]
<jugglinmike> Thanks, bobthecow!
<jugglinmike> also summatusmentis :)
<summatusmentis> I didn't do anything, don't thank me :)
jachymko is now known as jachymko[afk]
Evolution has joined #nanoc
<Evolution> could someone help me out a bit with a Rules for building a robots.txt
<Evolution> google's not being helpful, and the examples I'm finding aren't working quite right
<Evolution> oh, rock. nevermind I worked it out
<Evolution> you guys are great!
<summatusmentis> glad to help :)
<Evolution> ;-)
tantalum has joined #nanoc
<ddfreyne> jugglinmike: <% filter :erb do %> -- don't forget the do there
<ddfreyne> you also need to include Nanoc::Helpers::Filtering
<ddfreyne> and it's <% not <%=
<ddfreyne> Now that I think about it, I guess <%= filter :erb, @item[:register] %> should also be possible (but currently isn't)
<jugglinmike> aha! Thank you ddfreyne. Unfortunately, my coworker found an even grosser solution
<jugglinmike> which is to conditionally emit the value from the layout itself
<jugglinmike> :/
<ddfreyne> myeah :D
<tantalum> Hi,
<tantalum> In my setup, in Rules, the compile rule the layout is set to 'default'
<tantalum> is there a way to set the layout in the item it self?
<tantalum> basically I have a couple of random pages that need a special layout
<summatusmentis> you should be able to in the yaml block at the top of the item
<tantalum> summatusmentis: Sweet... Is there a doc that explains what all can go into the yaml block?
<summatusmentis> I'm not sure
<summatusmentis> although, I just tested on my site, and I'm not certain the yaml block actually does it
<summatusmentis> in Rules, I've also got specific compile rules for certain items
<ddfreyne> tantalum: You can basically put anything what you want in there; nanoc does not really care
<ddfreyne> Some helpers have assumptions about what's in there, but not a lot
<tantalum> ddfreyne: I understand... My main issue is that I wanted to know if I could define a layout in an item instead of having to write a Rule
<ddfreyne> tantalum: Yes, you can
<tantalum> Sweetness
<ddfreyne> tantalum: put something like "layout_name: default" in the attributes, and inside the compile block you can use "layout @item[:layout_name]"
<ddfreyne> (layout_name does not have a special meaning to nanoc)
<summatusmentis> ooh
<summatusmentis> that's slick
<summatusmentis> I'm always surprised by how flexible all this can be
<tantalum> ddfreyne: I really like that solution
<tantalum> here is my adaptation of it http://pastebin.com/jmFWAS7y
<jachymko[afk]> yep, i use something similar, too: https://gist.github.com/6528001
jachymko[afk] is now known as jachymko
<ddfreyne> jachymko: layout(item[:layout_name] || 'default') :)
<ddfreyne> tantalum, rather
<jachymko> actually, in my case, i want the default layout applied in addition to an item-specified one
<bobthecow> summatusmentis: it is all the flexible.
<bobthecow> here's a small bit of the rules file from one of my sites: https://gist.github.com/bobthecow/a274ba049d7e915dab85
jachymko is now known as jachymko[afk]
jachymko[afk] is now known as jachymko
yogsototh has quit [Remote host closed the connection]
bghost has joined #nanoc
cDlm has joined #nanoc
<summatusmentis> Evolution: can you paste your robots.txt solution?
<Evolution> summatusmentis: sure. one sec.
<Evolution> then just make a content/robots.txt.erb with whatever
<Evolution> there might be a better way
<summatusmentis> thanks
<summatusmentis> oh, I thought you were auto-generating a robots.txt
bghost has quit [Ping timeout: 264 seconds]
<Evolution> I will be in a bit. using sitemap hooks.
<Evolution> if I can figure out how to get what I want out of the sitemap helper
bghost has joined #nanoc
<summatusmentis> hrm
<summatusmentis> neat
tantalum has left #nanoc [#nanoc]
louquillio has quit [Remote host closed the connection]
louquillio has joined #nanoc
jachymko has quit [Quit: ZNC - http://znc.in]
jachymko has joined #nanoc