ddfreyne changed the topic of #nanoc to: 3.6.8 (mar 22th) | 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
louquillio_ has quit [Remote host closed the connection]
jugglinmike has quit [Quit: Leaving.]
louquillio_ has joined #nanoc
alerante has quit [Remote host closed the connection]
alerante has joined #nanoc
alerante has quit [Remote host closed the connection]
louquillio_ has quit [Read error: Connection timed out]
alerante has joined #nanoc
alerante has quit [Ping timeout: 250 seconds]
louquillio_ has joined #nanoc
relix has joined #nanoc
achal has joined #nanoc
<ddfreyne> bobthecow: I'd like to merge the nanoc 4 upgrade guide into master ASAP. As soon as I no longer have any major TODOs, I'd like to merge it. Are you OK with that?
<ddfreyne> This way, I can point people to it and sollicit feedback.
alerante has joined #nanoc
alerante has quit [Ping timeout: 240 seconds]
timgauthier_ has joined #nanoc
<timgauthier_> aha!
<timgauthier_> Hello Nanoc… I am in need of some assistance
<timgauthier_> Trying out Nanoc for first time. I was able to get nanoc working yesterday with Pygment highlighting (pygment.rb gem) and today when I restarted all of my dev enviroment (mac) and try to build the site it gives me a ruby error. When I coment out the lines with Pygment filtering in the rules file the build succeeds. Help?! (uploading code to github now)
VitamineD has quit [Quit: Leaving.]
VitamineD has joined #nanoc
alerante has joined #nanoc
alerante has quit [Ping timeout: 240 seconds]
jugglinmike has joined #nanoc
alerante has joined #nanoc
achal has quit [Quit: Connection closed for inactivity]
<ddfreyne> timgauthier_: Are you using bundler?
<ddfreyne> or were you using bundler?
<ddfreyne> Are you using rvm/rbenv/chruby?
<ddfreyne> Also, what Ruby error are you getting? Can you paste it using gist.github.com?
<timgauthier_> I was using bundler yea
<timgauthier_> I’ve switched to trying out middleman, but solved this error, it was missing uhm.
<timgauthier_> nokogiri
<ddfreyne> Ah yeah, the syntax highlighter requires nokogiri because it needs to parse the HTML and search for <pre> elements to highlight
gregkare is now known as gregkare_
gregkare_ is now known as gregkare
<timgauthier_> yeah, but if i had syntax highlighting working the day before, i don’t understand how i broke it to not work the next day. :P
<ddfreyne> timgauthier_: Did you use it with bundler one day and without the other?
<timgauthier_> I honestly don’t know, but that could be it.
<timgauthier_> it must have been it, since it just wasn’t in the gemfile.
<ddfreyne> timgauthier_: If you exeucte with bundler and the Gemfile doesn't have nanoc, `bundle exec nanoc` will fail with a Nokogiri LoadError
<ddfreyne> Probably!
<ddfreyne> Also, I recommend executing `bundle exec nanoc` rather than `nanoc`.
<timgauthier_> ugh, so many extra characters!
<ddfreyne> alias be="bundle exec"
<ddfreyne> be nanoc
<ddfreyne> It's much more zen, too
<timgauthier_> its been so many hours of figuring stuff out and switching things around… I can’t even remember why i switched to middleman…
<VitamineD> alias n='bundle exec nanoc'
<timgauthier_> haha VitamineD
<ddfreyne> You could also use guard-nanoc, so you don't even have to run nanoc *at all* :)
<timgauthier_> alias be is more versitile ;)
<timgauthier_> yeah, i couldn’t get that working either
<timgauthier_> I think i went to middleman because its more like jekyll
<ddfreyne> timgauthier_: Were you getting any specific error?
<ddfreyne> timgauthier_: I've never tried Middleman, and I have no reason to, because I wrote nanoc :)
<timgauthier_> hehe
<timgauthier_> I don’t remember nor have i documented my errors with watch. i think i tried to gem install and had a failure
achal has joined #nanoc
<ddfreyne> timgauthier_: You probalby need to add guard-nanoc to the gemfile, run `bundle`, then `be guard`
<ddfreyne> (having aliased `be` to `bundle exec` first)
<ddfreyne> I don't think I ever use `gem install` anymore… I use Bundler for everything
timgauthier__ has joined #nanoc
<timgauthier__> It felt like I was going to have to do a lot of overhead in the config to have some pages use templates and others not, and passing variables around. Middleman was suggestinf in #ruby and so far looks like it will be more like jekyll’s syntax for passing variables etc.
<timgauthier__> I’m sure what you wrote can do that, but i’m not experienced enough with ruby, and the documentation wasn’t enough for me.
timgauthier_ has quit [Ping timeout: 276 seconds]
<ddfreyne> timgauthier__: The aim of nanoc is to be the most flexible static site generator out there
<ddfreyne> And I believe it achieved that goal
<timgauthier__> cool :)
<ddfreyne> I am not sure what you mean by passing variables around, though. Rendering partials with specific variables?
<timgauthier__> yeah. and as I typed out what i was doing i realize I would just need to do it in a different way on nanoc
<timgauthier__> from the front matter, can you declare the layout? or is that just done from the setting file?
<ddfreyne> timgauthier__: You can do that by setting "layout: default" in the frontmatter, and then in the Rules file you change the #layout call (which looks like "layout 'default'") to use the item attribute, i.e. layout @item[:layout]
<timgauthier__> whats the benifit of using the routing like that?
<timgauthier__> i mean, in the rules file
<ddfreyne> timgauthier__: The benefit of defining the layout in the Rules file is that you only specify it in a single file
<timgauthier__> instead of in each file/location?
<ddfreyne> While still having the ability to specify it in files individually, if you need/want it
<ddfreyne> Yeah
<timgauthier__> so you can do exactly like in middleman where you can specify a layout or routing with the file itself or you can do it in the rules file?
<ddfreyne> Yes
<ddfreyne> timgauthier__: You can also e.g. set 'path: "/robots.txt"' in the frontmatter and then in the Rules file check whether @item[:path] is not nil, and use that in the routing rule instead of the normal flow
<ddfreyne> I use that for a few files on the nanoc web site (robots.txt and sitemap.xml, I believe)
<timgauthier__> the thing i felt and was running into was trying to build the blog portion. My site calls it journal and has that as the address, but when i called the route or compile anything but /posts/ it was failing. I could call it posts but it would still output to the journal folder. But I was having weirdness. I was expecting whatever folder tree i build that would be what nanoc would output
<ddfreyne> timgauthier__: By default nanoc generates index.html files in directories, which leads to nice URLs (e.g. http://example.com/about/ instead of http://example.com/about.html)
<ddfreyne> timgauthier__: I'm at work and don't have that much time, but I am available later on
<ddfreyne> timgauthier__: Feel free to share the structure of your `content/` dir and the contents of the Rules file though. That could be helpful
<timgauthier__> i have a github for it
<ddfreyne> That is cool to
<ddfreyne> o
<ddfreyne> Alright, have to go for a bit. Will be around later
<timgauthier__> i dont think i will be on, as its in the evening here in europe, have fun though!
<ddfreyne> I am in Berlin, also Europe :)
<ddfreyne> AFK
<timgauthier__> Zwichau
timgauthier__ has quit [Ping timeout: 276 seconds]
timgauthier has joined #nanoc
VitamineD has quit [Quit: Leaving.]
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
alerante has quit []
VitamineD has joined #nanoc
terinjokes has quit [Quit: ZNC - http://znc.in]
terinjokes has joined #nanoc
<timgauthier> bloop
<timgauthier> ok, where did i write that post
jutah has quit [Quit: Connection closed for inactivity]
<guardian> ddfreyne: any opinion on #413?
<timgauthier> why can’t route '/posts/*' do be route ‘/journal/*’ do?
<timgauthier> i missed some backticks and formatting in that.. bleh
<timgauthier> with an @item[] how can you do a check to see if it exsists? like if @item[:title]
<timgauthier> trying to install the nanoc-guard gem, having an error on bundle install http://pastie.org/9071045
timgauthier has quit [Ping timeout: 240 seconds]
relix has joined #nanoc
ics has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
timgauthier has joined #nanoc
irsol has quit [Ping timeout: 255 seconds]
irsol has joined #nanoc
<timgauthier> turns out it was that nasty bug with Clang again
<ddfreyne> timgauthier: If you have content/journal/ instead of content/posts/, you can use route '/journal/*/' instead of route '/posts/*/'
<ddfreyne> Those patterns correspond with the structure in the content/ directory
<timgauthier> does that following / make a difference?
<ddfreyne> timgauthier: @item[:title].nil? will return true if it is nil
<timgauthier> is there a logical opposite to that?
<ddfreyne> timgauthier: '/posts/*' would also match the identifier /posts/ itself, which is probably not what you want
<ddfreyne> timgauthier: @item[:title] will be true-y if it is not nil and not false
<ddfreyne> if @item[:title] ; ... ; end
<timgauthier> ok that makes sense
<ddfreyne> That clang error is weird.
<ddfreyne> I actually had something like that with clang before, now that I think of it... although that was with Go + OpenGL, heh
alerante has joined #nanoc
<ddfreyne> guardian: I'm a bit pressed for time, but if you can write a PR for #414 that would be really cool
<ddfreyne> (Rather, one that has parent_config_file)
<timgauthier> the clang error is due to OSX updating the xcode tools, and clang/ruby/rest of the world not being there yet
<timgauthier> how do you pronounce nanoc ? :P
<ddfreyne> nah-nock
<timgauthier> ok coo :P haha i’ve been saying it nah-nöck
<timgauthier> pretty late time to finish work :P
<timgauthier> what is the closest equivolent to site.variables like in jekyll?
<ddfreyne> I don't know what site.variables is.
<ddfreyne> You can add stuff to nanoc.yaml though, and later access it using @config[…]
<timgauthier> thanks that might be it
<ddfreyne> GitHub is acting up :(
<timgauthier> how so?
<ddfreyne> Seems to be OK now.
<ddfreyne> Anyway, sleep, night!
alerante has quit [Remote host closed the connection]
jugglinmike has quit [Quit: Leaving.]
timgauth_ has joined #nanoc
timgauthier has quit [Quit: timgauthier]
timgauth_ is now known as timgauthier
<timgauthier> how do you assign something to the nanoc.yaml so that i can use it later with @config[]?
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
timgauthier_ has joined #nanoc
<timgauthier_> asd
timgauthier_ has left #nanoc [#nanoc]
<timgauthier> sorry
<timgauthier> oh... that was way easier then i thought, never mind the adding a "variable" to the yaml thing, figured that out!
alerante has joined #nanoc
alerante has quit [Changing host]
alerante has joined #nanoc
<timgauthier> with posts.compiled_content is there a way to excerpt and truncate?
alerante has quit [Ping timeout: 240 seconds]