Skip to content

"Last updated" metadata not preserved after versioning #5598

Open

Description

@Josh-Cena

🐛 Bug Report

Description

All versioned docs have the same "last updated" info: the time and author when that version was frozen.

Have you read the Contributing Guidelines on issues?

Yes

Steps to reproduce

Check https://docusaurus.io/docs/next/markdown-features/admonitions versus https://docusaurus.io/docs/markdown-features/admonitions: the former has a date that's prior to the latter because the latter is when the 2.0.0-beta.6 folder was created, not the actual doc commit date.

I guess we should freeze the last updated metadata as well? Versioned docs can still be updated though...

Activity

  1. added
    bug
    status: needs triage
    on Sep 21, 2021
  2. slorber commented on Sep 22, 2021

    @slorber
    Collaborator

    I understand the problem, not sure exactly how to solve this 🤪


    Maybe we should persist both in frontmatter:

    • the last update date of the original doc when creating a version
    • the date when the version was created

    And do max(dateOriginalDocUpdate,dateUpdate)
    Unless dateUpdate === dateVersionCreated in which case we use dateOriginalDocUpdate (is doc was not modified, just versioned/copied, so we ignore the fs date?)

    That seems overly complex 😓


    Maybe we should find a way to set a correct date on copied files, but I'm not sure it's possible the way we use Git history

  3. Josh-Cena commented on Sep 22, 2021

    @Josh-Cena
    CollaboratorAuthor

    We should find a way to specifically ignore one timestamp from the git history. Probably by adding extra logic in the doc versioning CLI?

  4. removed
    status: needs triage
    on Oct 30, 2021
  5. dfranco commented on Jan 11, 2026

    @dfranco

    I kind of have the same issue using 3.9.2.

    I had to disable git created/ last updated in docusaurus config.

    Is there any ETA or solutions for this issue ?

  6. slorber commented on Jan 16, 2026

    @slorber
    Collaborator

    We still don't know what should be done to fix this problem.

    Fortunately, the next version of Docusauurs (v3.10) will have a VCS API that lets you provide your own logic for what is the "last updated" metadata of a file.
    #11512

    This gives the ability to innovate and try to solve the problem in userland. If our community is able to figure out a good solution to this problem using this API, we may be able to merge it back to Docusaurus core.

  7. aakritigarkoti commented on Oct 13, 2026

    @aakritigarkoti

    Reviewed this versioning metadata issue. Following along for updates as part of issue triage and documentation coordination!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions