Skip to content

Sitemap <lastmod> is omitted with experimental_vcs: 'default-v2' in Docusaurus 3.10.2 #12322

Description

@eMUQI

Have you read the Contributing Guidelines on issues?

Prerequisites

  • I'm using the latest version of Docusaurus.
  • I have tried the npm run clear or yarn clear command.
  • I have tried rm -rf node_modules yarn.lock package-lock.json and re-installing packages.
  • I have tried creating a repro with https://new.docusaurus.io.
  • I have read the console error message carefully (if applicable).

Description

After enabling:

future: {
  experimental_vcs: 'default-v2',
},

the production build completes successfully, but the generated sitemap.xml does not contain a <lastmod> value for a committed documentation page.

Using the same repository and configuration with experimental_vcs: 'git-ad-hoc' produces a <lastmod> value as expected.

Reproducible demo

https://github.com/eMUQI/docusaurus-vcs-sitemap-repro

Steps to reproduce

Clone the repository so that the Git history is available:

git clone https://github.com/eMUQI/docusaurus-vcs-sitemap-repro.git
cd docusaurus-vcs-sitemap-repro
npm ci
npm run verify:repro

The verification script performs two production builds:

  1. experimental_vcs: 'default-v2'
  2. experimental_vcs: 'git-ad-hoc'

It then counts the <url> and <lastmod> elements in each generated sitemap.

Expected behavior

When the sitemap plugin is configured with:

sitemap: {
  lastmod: 'date',
},

the default-v2 production build should include a <lastmod> value for the committed documentation page, as the git-ad-hoc build does.

Actual behavior

With default-v2, the generated sitemap contains the URL but no <lastmod>

Your environment

Self-service

  • I'd be willing to fix this bug myself.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugAn error in the Docusaurus core causing instability or issues with its executionstatus: needs triageThis issue has not been triaged by maintainers

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions