relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
guardian has quit [Read error: Operation timed out]
guardian has joined #nanoc
jugglinmike has quit [Quit: Leaving.]
louquillio has joined #nanoc
bensonshaji has joined #nanoc
<bensonshaji>
any way to generate category pages for the post?
<bensonshaji>
found few articles on the web, but they seem to dead.... when implemented.
<ddfreyne>
bensonshaji: There is a guide for paginating articles on the nanco web site, which even though is not what you want, provides techniques that you can use for implementing category pages
<bensonshaji>
ddfreyne, my markdown file has a line "categories: linux ruby" when I run nanoc compile I get this error "undefined method `map' for "tech":String" but the same works when I change my markdown file line to
<bensonshaji>
categories:
<bensonshaji>
- linux
<bensonshaji>
- ruby
<bensonshaji>
ddfreyne, why is it so?
<ddfreyne>
bensonshaji: If you say “categories: linux ruby” then the :categories attribute will be a string "linux ruby"
<ddfreyne>
bensonshaji: You can say categories: [ linux, ruby ]
<ddfreyne>
Or even categories: [ "linux", "ruby" ] (strings are optionally quoted in YAML)
<bensonshaji>
Is there any way I can deal with "categories: linux ruby" ?
<ddfreyne>
bensonshaji: You could set up a pre-processor that takes the :categories attribute and splits on \s+
<travis-ci>
[travis-ci] nanoc/nanoc-cli/master 02f6e5f Denis Defreyne: The build passed.
relix has joined #nanoc
<bensonshaji>
ddfreyne, when I target the output path to "/categories/#{category}" it raises an error undefined method captures of a route which was previously defined.
<bensonshaji>
ddfreyne, as per that article it has something like this "/tags/#{tag.to_url}" when I used "to_url" it throws an error again as undefined method
bensonshaji has quit [Ping timeout: 240 seconds]
bensonshaji has joined #nanoc
<travis-ci>
[travis-ci] nanoc/nanoc-check/master 3f0df94 Denis Defreyne: The build passed.
<bensonshaji>
ddfreyne, any help with that?
<travis-ci>
[travis-ci] nanoc/nanoc-check/master 5434aff Denis Defreyne: The build passed.
terinjokes has quit [Ping timeout: 265 seconds]
tom[] has quit [Ping timeout: 265 seconds]
_whitelogger_ has joined #nanoc
<bensonshaji>
ddfreyne, when I havent added any preprocess routing works fine.
<bensonshaji>
ddfreyne, when I add the preprocessing function the route throws an error
<ddfreyne>
bensonshaji: That means there are items with identifiers like /articles/somethingsomething/ that don't have the date in their identifier
<ddfreyne>
bensonshaji: So my guess is that you have content/articles/2014-03-22-someslug.md AND that you are generating items like /articles/categories/something/ in the preprocessor
<ddfreyne>
Those generated items won't match that regex
tlevine has joined #nanoc
<ddfreyne>
So /.../.match(item.identifier) will return nil
<ddfreyne>
And you get a no method error for nil
<bensonshaji>
ddfreyne, I think so,
<bensonshaji>
ddfreyne, should I add another route to match the preprocess function?
<ddfreyne>
bensonshaji: That would be my suggestion, yes
<bensonshaji>
ddfreyne, but why does the preprocess function depends on the routing of /articles/* ?
<ddfreyne>
bensonshaji: Because you specified it... you're generating items with identifiers like "/articles/categories/#{category}"
<bensonshaji>
ddfreyne, I am not sure how to route works for content that doesn't exist and yet to be created
<ddfreyne>
bensonshaji: Preprocess happens first, then the routing
<ddfreyne>
So when routing happens, thos eitems will exist (in memory)
dkm has joined #nanoc
bobthecow has joined #nanoc
<bensonshaji>
bensonshaji, page getting generated like this output/articles/categories/["a"]/index.html
<travis-ci>
[travis-ci] nanoc/nanoc-deploying/master c987f3a Denis Defreyne: The build passed.
koan_ is now known as koan
bobthecow has quit [Ping timeout: 265 seconds]
bensonshaji has quit [Quit: Leaving]
dkm has quit [Ping timeout: 265 seconds]
bobthecow has joined #nanoc
bobthecow has joined #nanoc
bobthecow has quit [Changing host]
dkm has joined #nanoc
bobthecow has quit [Remote host closed the connection]
bobthecow has joined #nanoc
bobthecow has joined #nanoc
bobthecow has quit [Changing host]
achal_ has joined #nanoc
achal_ is now known as achal
bensonshaji has joined #nanoc
louquillio has quit [Remote host closed the connection]
bensonshaji has quit [Quit: Leaving]
<GitHub43>
[nanoc-core] ddfreyne pushed 1 new commit to master: http://git.io/xxA8IQ
<GitHub43>
nanoc-core/master 8378dd8 Denis Defreyne: Turn item during recording into view
<GitHub102>
[nanoc-core] ddfreyne pushed 1 new commit to master: http://git.io/4m470Q