lgraubner / sitemap-generator

Easily create XML sitemaps for your website.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Option to use last-modified header for <lastmod>

Lingonmirakel opened this issue · comments

Do you want to request a feature or report a bug?
Feature.

What is the current behavior?
lastMod is a boolean, and will always use today’s date if set to true.

What is the expected behavior?
According to https://webmasters.googleblog.com/2014/10/best-practices-for-xml-sitemaps-rssatom.html the last modification time should be "the last time the content of the page changed meaningfully". I would like to be able to use the response’s last-modified header instead of today’s date for <lastmod>.

That's probably the best way to go. Maybe I have some spare time this week and can implement it.

Implemented it as stated above (ff3022f), new release is out!

Well done, thanks Lars!