Skip to content

chore: add lastmod tag for the auto generated sitemap in docusaurus config#798

Open
amaan-bhati wants to merge 2 commits intomainfrom
sitemap-auto-update
Open

chore: add lastmod tag for the auto generated sitemap in docusaurus config#798
amaan-bhati wants to merge 2 commits intomainfrom
sitemap-auto-update

Conversation

@amaan-bhati
Copy link
Member

@amaan-bhati amaan-bhati commented Mar 6, 2026

What has changed?

Please include a summary of the change.

  • tried creating a sitemap for the docs website to use it in the main sitemap tree at "https://keploy.io/sitemap.io".
  • created the sitemap for the same
  • while checking in the config if there is any rule that might prevent the route creation exactly at "https://keploy.io/docs/sitemap.xml"(since this would be added in the main sitemap) i figured out that docusaurus automatically does create a sitemap for us, i also verified it by visiting the url (https://keploy.io/docs/sitemap.xml)/
  • Hence removed the sitemap that i created, but there was still a problem with the generated sitemap that the sitemap has no tag, hence i simply added the lastmod: "date" in the config, this adds the date.

verification:

  • Docusaurus plugin source defines what lastmod values mean:

    • node_modules/@docusaurus/plugin-sitemap/src/options.ts (line 33)
  • It documents:

    • null: no lastmod
    • "date": YYYY-MM-DD (we want the lastmod in this format only)
    • "datetime": ISO 8601 datetime
  • Docusaurus plugin source shows "date" formatting logic:

    • node_modules/@docusaurus/plugin-sitemap/src/createSitemapItem.ts (line 30)
    • date: (timestamp) => new Date(timestamp).toISOString().split('T')[0]!
      This is exactly YYYY-MM-DD.
  • source of info: https://docusaurus.io/docs/api/plugins/@docusaurus/plugin-sitemap#lastmod

This PR Resolves #(issue)

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue).
  • New feature (non-breaking change which adds functionality).
  • Breaking change (fix or feature that would cause existing functionality to not work as expected).
  • Documentation update (if none of the other choices apply).

How Has This Been Tested?

Please run npm run build and npm run serve to check if the changes are working as expected. Please include screenshots of the output of both the commands. Add screenshots/gif of the changes if possible.

Screenshot 2026-03-06 at 8 31 14 PM

Checklist:

  • My code follows the style guidelines of this project.
  • I have performed a self-review of my own code.

Signed-off-by: amaan-bhati <amaanbhati49@gmail.com>
Copilot AI review requested due to automatic review settings March 6, 2026 14:06
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new static/sitemap.xml intended to publish an updated sitemap for keploy.io, likely to be incorporated into a broader “sitemap tree” later.

Changes:

  • Introduces a new static/sitemap.xml containing ~2500 <url> entries across docs, blog, legal, and marketing routes.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

…onfig

Signed-off-by: amaan-bhati <amaanbhati49@gmail.com>
@amaan-bhati amaan-bhati changed the title feat: add new updated sitemap (we'll add it to the sitemap tree on main) chore: add lastmod tag for the auto generated sitemap in docusaurus config Mar 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants