> It throws an error
> TypeError at /feed.xml can't convert nil into String
>
> Stack trace at
>
> z:/Ruby/lib/ruby/gems/1.8/gems/nanoc3-3.0.1/lib/nanoc3/helpers/
> blogging.rb: in +
> @site.config[:base_url] + (item[:custom_path_in_feed] || item.reps
> [0].path)
Hi,
This happens because #url_for(item) is being called with an item that
does not have an output file (route returns nil). This is a bug in
#url_for: instead of breaking, it should simply return nil as well.
#atom_feed is buggy too: items that aren't outputted shouldn't be
included in the feed.
I'll fix this issue ASAP. For the time being, you can override
#url_for and make it return nil for items that are not outputted.
Regards,
Denis
--
Denis Defreyne
denis.d...@stoneship.org
> It throws an error
> TypeError at /feed.xml can't convert nil into String
Hi,
I've fixed this bug in revision 1453. You can see the diff at <http://projects.stoneship.org/hg/nanoc/rev/0482155ed3d7
>. If you want, you can take the most recent lib/nanoc3/helpers/
blogging.rb file from the repository and put it in your site's lib/
directory; the code in there will override the existing code.
> I think I remembered stumbling against a similar problem when I
> migrated my site. But, because I needed RSS feeds as well and slightly
> different Atom feeds, I completely rewrote the helpers myself. If
> you're interested, you can find them here (they seem to work fine on
> h3rald.com):
>
> http://github.com/h3rald/h3rald/blob/master/lib/helpers.rb
Hi,
Your rewritten helpers are interesting. I might take a few ideas from
them, if you don't mind.
I'd recommend against overriding the existing helpers, though. I
believe that it is better to create a separate module for each helper.
For example, H3rald::Nanoc3::Helpers instead of Nanoc3::Helpers.