close
Skip to content

[Feature Request] Update sitemap's lastmod datatime when data modified only. #8820

@filzrev

Description

@filzrev

Is your feature request related to a problem? Please describe.

sitemap.xml contains lastmod datetime information.
Current docfx implementation update this value every time when docfx build executed.

It seems there is roadmap to support lastmod updated when data modified, but currently this comment is removed.
3fed33d#diff-9e7357a546022bca50c8ec6d9681852067e98a79c287ebf5e88dfcc97a760df4L19

Describe the solution you'd like

This datetime should be changed if there are major changes in content
So I thought datetime should be retrieved by following priority.

  1. Metadata specified on document (like ms.date) if defined.
    -> Currently there is scandalized metadata name is not defined.
    -> Microsoft Learn define these metadata (https://learn.microsoft.com/en-us/contribute/metadata)
  2. Git last commit/modified date. (like DocFx.Plugin.LastModified)
  3. (Fallback) Last modified datetime on local file system or current build datetime.
    -> It may need to suppress overwrite file if content is not changed?

Expected lastmod datatime usage

sitemap's lastmod data itself is not so useful for my usage. (At least it works if every time modified).
thought If docfx's standardized last modified datetime is defined.
It can implement PostProcessor to generate RSS/Atom feed. (If standardized document updated date is available)

Metadata

Metadata

Assignees

No one assigned

    Labels

    static-siteProduce static HTML output ready for publishing to hosts like GitHub pages

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions