ddfreyne changed the topic of #nanoc to: 3.6.2 (mar 23th) | 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
bghost has quit [Quit: leaving]
bghost has joined #nanoc
bghost has quit [Client Quit]
bghost has joined #nanoc
bghost has quit [Changing host]
bghost has joined #nanoc
Segismond_ has joined #nanoc
Segismond has quit [Ping timeout: 258 seconds]
jadd_ has joined #nanoc
jadd_ has quit [Ping timeout: 264 seconds]
jadd_ has joined #nanoc
jadd_ has quit [Ping timeout: 240 seconds]
jadd_ has joined #nanoc
jadd- has joined #nanoc
jadd_ has quit [Ping timeout: 255 seconds]
Rym has quit [Quit: Rym]
pavelkunc has joined #nanoc
Palmik has joined #nanoc
<Palmik> Hi guys. Can I have a multiple pattern matches to use the same compile/route rule?
<ddfreyne> Palmik: Hi! You can loop over them like this:
<ddfreyne> [ '/foo/*/', '/bar/*/' ].each do |rule|
<ddfreyne> compile rule do … end
<ddfreyne> end
<Palmik> ddfreyne: Thanks! :)
Palmik has quit [Quit: Lost terminal]
Palmik has joined #nanoc
jadd- has quit [Quit: Leaving...]
jadd_ has joined #nanoc
kitallis has joined #nanoc
jadd_ has quit [Client Quit]
jadd_ has joined #nanoc
Rym has joined #nanoc
<Palmik> Hmm, I have a default template that contains <html> ... </html> etc. and have a yield slot. I would like to also have a 'post' template that is basically the default template, plus wraps the yield. Is that possible? I know that it is possible the otherway round (to render template inside the current one).
jadd_ has quit [Quit: Leaving...]
<ddfreyne> Palmik: You can have multiple layouts in a single compilation rule
pavelkunc has quit [Quit: Leaving.]
<Palmik> ddfreyne: Ah, thanks, I will try that out. :)
<Palmik> Yes, that works.
<Palmik> This is mine project structure: http://hpaste.org/85883 this is mine compass/config.rb http://hpaste.org/85884 and this is the relevant part of Rules http://hpaste.org/85885 (it's on the very top of Rules). The problem is that when I do 'nanoc', the stylesheets are not generated. Any guess as to what am I doing wrong?
yogsototh has joined #nanoc
<ddfreyne> Palmik: the last #compile should be #route
<Palmik> Om my, you are right.
<Palmik> Hmm, is it possible to add a kind to an item based on a wildcard? For example when the item matches '/post/*' I would like to assign [:type] = :post
<ddfreyne> Palmik: You can do that in the preprocess block. In the rules: preprocess do ; @items.select { |i| i.identifier.start_with?('/post/') }.each { |i| i[:type] = :post } ; end
<Palmik> Yeah, I guess start_with will suffice for my purposes. :)
<Palmik> Thanks.
<Palmik> Is code in lib/ run before preprocess or the other way round? I'm asking because I have some code in lib/ that depends on the :type defined in preprocess, but I would also like to add 'prev' and 'next' links to items.
<Palmik> The text after the last comma is not relevant.
<ddfreyne> Yes, lib/ is loaded first
<Palmik> I guess it should not matter in my case since I will call the code from lib/ after preprocess anyway.
<Palmik> Hmm, so it seems to matter.
<Palmik> I have this is my helper: http://hpaste.org/85892 this is my preprocess: http://hpaste.org/85894 and I have this in my layout: http://hpaste.org/85896 The problem is that the array is empty (when I move the 'start_with' inside the definition of 'posts', it works).
<Palmik> I though the post call in the template would happen after preprocess.
<ddfreyne> Palmik: Hmm, that looks correct. lib/ is loaded first, then preprocessing is done, then the actual compilation is done
<ddfreyne> Palmik: I’m at work atm, so not really a lot of time to help sadly. Maybe this evening?
<Palmik> No problem, I should also probably work on something else right now. :)
pavelkunc has joined #nanoc
bghost has quit [Ping timeout: 264 seconds]
<guardian> google still hasn't downloaded my robots.txt
<guardian> weird
bghost has joined #nanoc
bghost has quit [Changing host]
bghost has joined #nanoc
pyro111 has joined #nanoc
xo__ has joined #nanoc
Segismond_ has quit [Read error: Connection reset by peer]
pavelkunc has quit [Quit: Leaving.]
jimjimovich has joined #nanoc
<jimjimovich> how do you access variables from nanoc.yaml in your layouts?
<ddfreyne> jimjimovich: @config[:foo]
<ddfreyne> jimjimovich: Assuming that you have “foo: something” in your nanoc.yaml of course
<jimjimovich> that's what I thought, but it doesn't seem to be working for some reason ... hmm
<jimjimovich> do I have to load nanoc.yaml somewhere first? @config[:foo] returns nil
<ddfreyne> No, that should work right away. Can you share the config file and the code you use to access attributes there?
<darix> jimjimovich: you mean config.yaml not nanoc.yaml right?
<ddfreyne> darix: nanoc.yaml is also possible as of 3.7
<darix> or is nanoc.yaml content/.../nanoc.yaml
<darix> aha
<ddfreyne> (it makes sense to call it that, and con<tab> now autocompletes nicely)
<darix> so jimjimovich are you using 3.7?
<jimjimovich> actually, no, I'm not. I guess the docs are more up to date than the gem :)
<jimjimovich> changed it back to config.yaml (what it was originally) and it still doesn't work
jugglinmike has joined #nanoc
<ddfreyne> jimjimovich: Are you replacing :foo with the exact attribute you’re trying to access?
<jimjimovich> yes, and even added in foo: 'bar' and try to access it with @config[:foo] with no luck
<ddfreyne> Hmmmmmm… strange
<jimjimovich> even if that's the only thing in the yaml file
<jimjimovich> was the yaml format updated? I got this from a site I made like 6 months ago.
<ddfreyne> No, YAML is a fixed format
<ddfreyne> jimjimovich: Care to share your config file?
<ddfreyne> Probably something silly
<jimjimovich> also, the config file wasn't generated when I generated the site, that's why I copied it from an old one. I have just foo: bar in there now ... and still doesn't work.
<jimjimovich> and this in my layout http://pastebin.com/NUseBxVu
<jimjimovich> @item.path works fine
<ddfreyne> jimjimovich: Okay, very weird. Do you have both config.yaml and nanoc.yaml?
<ddfreyne> jimjimovich: What nanoc version are you using?
<jimjimovich> no
<ddfreyne> (All 3.x releases are backwards compatible, so upgrading to a newer version shouldn’t have changed anything)
<ddfreyne> afk for a meeting in a minute
<jimjimovich> um, okay, now it's working but my @item.path is not. I'll dig into that now.
<jimjimovich> oh geesh, this is dumb! in the yaml.config file that I copied from the other site, the output folder was changed from 'output' to 'public' ... so I wasn't seeing the changes show up. DOH!
jimjimovich has quit [Quit: Leaving.]
<ddfreyne> haha :)
<ddfreyne> happens!
bghost has quit [Ping timeout: 245 seconds]
bghost has joined #nanoc
bghost has joined #nanoc
bghost has quit [Changing host]
pyro111 has quit [Ping timeout: 240 seconds]
jadd_ has joined #nanoc
jadd_ has quit [Ping timeout: 255 seconds]
jadd_ has joined #nanoc
kitallis has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
jadd_ has quit [Quit: Leaving...]
bghost has quit [Ping timeout: 245 seconds]
bghost has joined #nanoc
el-cuco has joined #nanoc
bghost has quit [Ping timeout: 252 seconds]
jugglinmike has quit [Quit: Leaving.]
jugglinmike has joined #nanoc
el-cuco has quit [Read error: Operation timed out]
bghost has joined #nanoc
bghost has quit [Read error: Connection reset by peer]
jugglinmike has quit [Ping timeout: 252 seconds]
jugglinmike has joined #nanoc
jugglinmike has quit [Client Quit]
jugglinmike has joined #nanoc
jugglinmike has quit [Quit: Leaving.]
number-six has quit [Remote host closed the connection]
jaspervdj has quit [Remote host closed the connection]
number-six has joined #nanoc
jaspervdj has joined #nanoc
el-cuco has joined #nanoc
el-cuco has quit [Ping timeout: 248 seconds]
pavelkunc has joined #nanoc
pavelkunc has quit [Quit: Leaving.]
pavelkunc has joined #nanoc
el-cuco has joined #nanoc
Palmik has quit [Quit: Lost terminal]
el-cuco has quit [Read error: Operation timed out]
bghost has joined #nanoc
yogsototh has quit [Remote host closed the connection]
zi has quit [Read error: Connection reset by peer]
zi has joined #nanoc
alerante has joined #nanoc
alerante has quit [Remote host closed the connection]
alerante has joined #nanoc
jadd_ has joined #nanoc
Rym has quit [Quit: Rym]