Closed WardCunningham closed 8 years ago
Rather than excluding pages without a date from the sitemap, I wonder if they should be included but without a date (lastmod is optional)?
if isNaN(Date.parse(page.date)) == false
date = new Date(page.date)
result["lastmod"] = date.toISOString().substring(0,10)
Sure. We're dealing with it in the json sitemap.
In the json, everything is optional. But when fields are present, they should make sense. This is the ideal anyway.
This guard protects against pages with no date, probably with no journal at all. I have such pages in my test site and get this error on startup.