Re: [nanoc] Dealing with multiple authors and atom_feed

31 views
Skip to first unread message

justin

unread,
Mar 14, 2013, 1:40:19 AM3/14/13
to na...@googlegroups.com
That's trying to set the author / uri for the whole feed, not for an individual item, i.e. xpaths:

    /feed/author/name
    /feed/author/uri

The @item you're seeing here:


... is your *feed* item (usually the item with identifier  /feed/), not a particular *article* item in the feed. Add a whole-feed author and it'll stop complaining. 

--j



On Wed, Mar 13, 2013 at 3:00 PM, Angelina Fabbro <angelin...@gmail.com> wrote:
Hello everyone,

I've run into a snag in generating my site's atom feed. We have multiple authors on our blog. We set our post meta-data/YAML as follows on each post:

---
title: "New Post"
author_name: "Angelina Fabbro"
created_at: 2013-03-13 14:03:42 -0700
kind: article
---

So author_name: is assigned on each item.

The docs say:

The feed item will need to know about the feed title, the feed author name, and the URI corresponding to the author. These can be specified using parameters, as attributes in the feed item, or in the site configuration.
title - The title of the feed, which is usually also the title of the blog.
author_name - The name of the item’s author.
author_uri - The URI for the item’s author, such as the author’s web site URL.

and the code in the blogging helper looks like it should look for the author_name when it's not found in the params:

builder.author_name = params[:author_name] || @item[:author_name] || @site.config[:author_name]


My feed.erb that build to feed.xml has the following:

<%= atom_feed :title => 'Blog Name', :author_uri => 'www.example.com/blog', :limit => 10 %> 

However, when I build the site I receive the error:

Compiling site…
Error: Cannot build Atom feed: no author_name in params, item or site config 

I'm confused as it seems like I happen to have author_name set on all of the items.

Can someone let me know what I've missed here? Would love to get this working. 

Please let me know if there is any additional information I can provide to help you help me solve this problem.

Thanks in advance,

- Angelina 

--
--
You received this message because you are subscribed to the nanoc discusssion group.
 
To post to this group, send email to na...@googlegroups.com
To unsubscribe from this group, send email to
nanoc+un...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/nanoc?hl=en
 
---
You received this message because you are subscribed to the Google Groups "nanoc" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nanoc+un...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 



--
http://justinhileman.com

Denis Defreyne

unread,
Mar 17, 2013, 1:03:57 PM3/17/13
to na...@googlegroups.com
On 13 Mar 2013, at 23:00, Angelina Fabbro <angelin...@gmail.com> wrote:

> So author_name: is assigned on each item.
> [snip]
> Error: Cannot build Atom feed: no author_name in params, item or site config

Hi Angelina,

Either the feed item itself or the site configuration needs to have author_name and author_uri set. This should solve your issue.

Cheers,

Denis
Reply all
Reply to author
Forward
0 new messages