function generateFeeds(files, options) {
  if (!global.WF.options.buildRSS) {
    return;
  }
  if (!files || files.length === 0) {
    return;
  }
  gutil.log(' ', `Generating '${options.title}' RSS & ATOM feeds...`);
  const maxItems = options.maxItems || global.WF.maxArticlesInFeed;
  let context = {
    title: options.title,
    description: options.description,
    articles: getFullFeedEntries(files, maxItems, options.includeContent),
    host: 'https://developers.google.com',
    baseUrl: 'https://developers.google.com/web/',
    analyticsQS: ANALYTICS_QS,
  };
  if (options.baseUrl) {
    context.baseUrl = options.baseUrl;
  }
  if (options.section) {
    context.baseUrl += options.section + '/';
    // eslint-disable-next-line max-len
    context.analyticsQS = ANALYTICS_QS.replace('root_feed', options.section + '_feed');
  }
  // Note - use last updated instead of now to prevent feeds from being
  // generated every single time. This will only generate if the feeds are
  // actually updated.
  context.rssPubDate = wfHelper.dateFormatRSS(files[0].dateUpdatedMoment);
  context.atomPubDate = wfHelper.dateFormatAtom(files[0].dateUpdatedMoment);

  let template = path.join(global.WF.src.templates, 'atom.xml');
  let outputFile = path.join(options.outputPath, 'atom.xml');
  renderTemplate(template, context, outputFile);

  template = path.join(global.WF.src.templates, 'rss.xml');
  outputFile = path.join(options.outputPath, 'rss.xml');
  renderTemplate(template, context, outputFile);
}
Generate the RSS & ATOM feeds for a list of files

@param {Array} files List of files to generate feed items for
@param {Object} options Options used to generate the feed