How to use the sitemap.EnumChangefreq function in sitemap

To help you get started, we’ve selected a few sitemap examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github NG-ZORRO / ng-zorro-antd / scripts / prerender / sitemap.ts View on Github external
(r: string) => {
      const url = `${r}/${lang}`;
      return {
        url,
        changefreq: sitemap.EnumChangefreq.WEEKLY,
        priority: priorityMap[url] || 0.5,
        links: [{ lang: 'en', url: `${r}/en` }, { lang: 'zh', url: `${r}/zh` }]
      };
    }
  );
}
const sitemapInstance = sitemap.createSitemap({
  hostname: 'https://ng.ant.design',
  cacheTime: 600000,
  urls: [
    { url: '/', changefreq: sitemap.EnumChangefreq.WEEKLY, priority: 0.5, lastmodrealtime: true },
    ...generateUrls('en'),
    ...generateUrls('zh')
  ]
});

writeFileSync(join(buildConfig.outputDir, 'sitemap.xml'), sitemapInstance.toString(true));
github NG-ZORRO / ng-zorro-antd / scripts / prerender / sitemap.ts View on Github external
(r: string) => {
      const url = `${r}/${lang}`;
      return {
        url,
        changefreq: sitemap.EnumChangefreq.WEEKLY,
        priority: priorityMap[url] || 0.5,
        links: [{ lang: 'en', url: `${r}/en` }, { lang: 'zh', url: `${r}/zh` }]
      };
    }
  );