如何从站点地图 MeteorJS 中删除页面

How to delete page from sitemap MeteorJS

我用 gadicohen:sitemaps 生成了 sitemap 并且我有一些页面存在一个月。为了获得良好的 seo,我需要在它们过期后将它们从站点地图中删除。知道怎么做吗? Package

在我看来,您只需要使用(例如)gadicohen:synced-cron

构建的 cron 作业定期重新生成您的站点地图
SyncedCron.add({
  name: 'Update sitmap.xml',
  schedule: function(parser) {
    return parser.text('every 1 day');
  },
  job: function() {
    sitemaps.add('/sitemap.xml', function() {
      ... // define your sitemap
    return;
    }
  }
})