all files / tests/dummy/app/utils/ sitemap-entry-filter.js

100% Statements 6/6
100% Branches 2/2
100% Functions 1/1
100% Lines 6/6
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26                              222×     222×      
/* eslint-disable */
export default function sitemapEntryFilter(entry, segments, dynamicSegments) {
 
  /**
   * Uncomment the line below and open localhost:4200/sitemap.txt on your browser.
   * You will see what parameters are passed to this function in the console.
   */
  // console.log('sitemapEntryFilter:', entry, segments, dynamicSegments);
 
  /**
   * If the function doesn't return anything, the entry will not be included in the sitemap.
   * This is useful for excluding private routes.
   */
  // return;
 
  // Let's add some additional attributes to the homepage entry
  if (entry.loc === '') {
    entry.lastmod = '2017-01-01';
    entry.changefreq = 'monthly';
    entry.priority = '0.8';
  }
 
  return entry;
}