sitemap_lastmod
Update sitemap lastmod dates only when page content genuinely changes: hash the current HTML, compare it with the stored hash, and keep the prior date if nothing changed.
Instructions
Decide a sitemap lastmod date honestly. Hash the meaningful content of a page, compare it against the stored hash, and move the date only when the content genuinely changed. Stamping today's date on every URL every build teaches crawlers that the field carries no information.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| body | Yes | Current HTML of the page. | |
| today | Yes | Today's date, ISO format. | |
| previous_hash | No | Stored hash from the last run, or null for a page seen for the first time. | |
| strip_classes | No | Classes to remove before hashing: visitor counters, build ids, anything that changes on its own. | |
| strip_patterns | No | Regular expressions to remove before hashing. | |
| previous_lastmod | No | Stored lastmod, ISO date. |