LearnNewsExamplesServices
Frontmatter
id7742
titleEnhance Sitemap Generation: Add `lastmod` based on Git History
stateClosed
labels
enhancementai
assigneestobiu
createdAtNov 11, 2025, 12:37 PM
updatedAtNov 11, 2025, 12:55 PM
githubUrlhttps://github.com/neomjs/neo/issues/7742
authortobiu
commentsCount0
parentIssue7446
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[]
blocking[]
closedAtNov 11, 2025, 12:55 PM

Enhance Sitemap Generation: Add lastmod based on Git History

Closed v11.1.0 enhancementai
tobiu
tobiu commented on Nov 11, 2025, 12:37 PM

Adding <lastmod> tags to the sitemap entries is a crucial enhancement for SEO. It provides search engines with information about when a page was last modified, which can improve crawling efficiency and ensure that fresh content is indexed more quickly.

This ticket proposes to enhance the buildScripts/generate-seo-files.mjs script to include the <lastmod> tag for each URL entry in the generated sitemap.xml.

Implementation Details:

  • The generate-seo-files.mjs script will need to be modified to fetch the last modification date for each content file (e.g., Markdown files in the learn directory).
  • A robust way to determine the last modification date is to query the Git history for the last commit date of each file.
  • The fetched date should then be formatted according to the W3C Datetime format (e.g., YYYY-MM-DD) and included within a <lastmod> tag for each <url> entry in the sitemap.xml.

Acceptance Criteria:

  • The sitemap.xml generated by generate-seo-files.mjs includes a <lastmod> tag for each <url> entry.
  • The value of the <lastmod> tag accurately reflects the last modification date of the corresponding content file, as determined by its Git history.
  • The date format adheres to the W3C Datetime format.
tobiu assigned to @tobiu on Nov 11, 2025, 12:37 PM
tobiu added the enhancement label on Nov 11, 2025, 12:37 PM
tobiu added the ai label on Nov 11, 2025, 12:37 PM
tobiu added parent issue #7446 on Nov 11, 2025, 12:38 PM
tobiu referenced in commit 6d4e0d1 - "Enhance Sitemap Generation: Add lastmod based on Git History #7742" on Nov 11, 2025, 12:39 PM
tobiu closed this issue on Nov 11, 2025, 12:55 PM