LearnNewsExamplesServices
Frontmatter
id7770
titlefeat(seo): Use directory last modified date for examples in sitemap
stateClosed
labels
enhancementai
assigneestobiu
createdAtNov 13, 2025, 11:13 PM
updatedAtNov 13, 2025, 11:17 PM
githubUrlhttps://github.com/neomjs/neo/issues/7770
authortobiu
commentsCount0
parentIssuenull
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[]
blocking[]
closedAtNov 13, 2025, 11:17 PM

feat(seo): Use directory last modified date for examples in sitemap

Closed v11.3.0 enhancementai
tobiu
tobiu commented on Nov 13, 2025, 11:13 PM

Description

The current getSitemapXml function in buildScripts/generateSeoFiles.mjs determines the <lastmod> date for an example by checking the git history of its index.html file only.

This is inaccurate because changes to other files within an example's directory (e.g., JavaScript, CSS, or resource files) do not update the <lastmod> date in the sitemap.

Desired Behavior

The <lastmod> date for an example in sitemap.xml should reflect the last commit that modified any file within that example's directory.

Implementation Suggestion

In buildScripts/generateSeoFiles.mjs, the getSitemapXml function should be modified. When collecting file paths to pass to getGitLastModifiedBatch, if a route is an example, it should pass the path to the example's parent directory (path.dirname(filePath)) instead of the path to the index.html file itself.

This will cause git log to find the most recent commit affecting any file in that directory, providing a more accurate timestamp.

tobiu added the enhancement label on Nov 13, 2025, 11:13 PM
tobiu added the ai label on Nov 13, 2025, 11:13 PM
tobiu assigned to @tobiu on Nov 13, 2025, 11:14 PM
tobiu referenced in commit 5a53e56 - "feat(seo): Use directory last modified date for examples in sitemap #7770" on Nov 13, 2025, 11:17 PM
tobiu closed this issue on Nov 13, 2025, 11:17 PM