GenomeUS / keystone-express-sitemap

Dynamic sitemap generation for applications built on KeystoneJS
19 stars 15 forks source link

Filter not removing a previously allowed url #5

Open ddaddy opened 8 years ago

ddaddy commented 8 years ago

Hi, I am using a filter to only list properties that have been published like this:

filters: {
  'Property': function(property) {
    // Only list properties that have been published
    return property.publishedAt != null;
  }
}

It works fine in that it hides those that have no publishedAt date/time. When I add a publishedAt date to a property, it then appears in the sitemap 👍

The problem is, if I remove the date/time from a property, it remains in the sitemap until I restart keystone at which point it disappears.

ddaddy commented 7 years ago

I've also noticed that the odd link sneaks into the sitemap even though it's in the block list.

ddaddy commented 7 years ago

I think i've fixed the problem with the links on block list appearing. I have an endpoint /enquire/:property and added this to the block list yet the links still showed up in the site list. If I simply add /enquire to the block list it seems to not list them.