doctype xml
rss(version='2.0',
    xmlns:content='http://purl.org/rss/1.0/modules/content/',
    xmlns:wfw='http://wellformedweb.org/CommentAPI/',
    xmlns:dc='http://purl.org/dc/elements/1.1/'
    xmlns:atom='http://www.w3.org/2005/Atom')
  channel
    - var articles = env.helpers.getArticles(contents);
    title= locals.name
    atom:link(href=locals.url + '/feed.xml', rel='self', type='application/rss+xml')
    link= locals.url
    description= locals.description
    pubDate= articles[0].rfc822date
    generator Wintersmith - https://github.com/jnordberg/wintersmith
    language en
    each article in articles
      - var permalink = locals.url + article.url;
      item
        title= article.title
        link= permalink
        pubDate= article.rfc822date
        guid(isPermaLink='true')= permalink
        - var author = contents.authors[article.metadata.author + '.json'];
        author= author.metadata.name
        //- passing locals.url resolves all relative urls to absolute
        description= article.getHtml(locals.url)

doctype xml
rss(version='2.0',
    xmlns:content='http://purl.org/rss/1.0/modules/content/',
    xmlns:wfw='http://wellformedweb.org/CommentAPI/',
    xmlns:dc='http://purl.org/dc/elements/1.1/'
    xmlns:atom='http://www.w3.org/2005/Atom')
  channel
    - var articles = env.helpers.getArticles(contents);
    title= locals.name
    atom:link(href=locals.url + '/feed.xml', rel='self', type='application/rss+xml')
    link= locals.url
    description= locals.description
    pubDate= articles[0].rfc822date
    generator Wintersmith - https://github.com/jnordberg/wintersmith
    language en
    each article in articles
      - var permalink = locals.url + article.url;
      item
        title= article.title
        link= permalink
        pubDate= article.rfc822date
        guid(isPermaLink='true')= permalink
        - var author = contents.authors[article.metadata.author + '.json'];
        - if (!author) {author = { metadata: {name: null}} };
        author= author.metadata.name
        //- passing locals.url resolves all relative urls to absolute
        description= article.getHtml(locals.url)

Add check to ensure author file exists
Add check to ensure author file exists

Checks if Author is defined. If not, falls back to an almost null object