<commit_before>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)<commit_msg>Refactor<commit_after>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= author.metadata.name
        else
            author= article.author
        //- passing locals.url resolves all relative urls to absolute
        description= article.getHtml(locals.url)
{'fraction_non_alphanumeric': 0.1345054945054945, 'fraction_numerical': 0.015824175824175824, 'mean_word_length': 2.870748299319728, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 2, 'xml': 14}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5195633', 'n_tokens_mistral': 735, 'n_tokens_neox': 715, 'n_words': 132}