Skip to content

Add updatedCommitHash to the page object #3520

@onmax

Description

@onmax

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

I would like to show a text in the footer like:

Edited at ${updatedAt} (${commitHash}).

Describe the solution you'd like

updatedAt is being fetched from this getGitTimestamp function.

I would like to propose a new function called getCommitHash function which also receives a file: string as an argument called updatedCommitHash and then add it to the page type

Describe alternatives you've considered

I am going to built this code for my own vitepress project, but I think it might be beneficial for other pepole.

Additional context

I would like to make a PR if we agree this is a good thing to add to vitepress.

First, I would like to hear an OK from the maintainers.

PD: Suggest better names as I think my proposed names are not very descriptive 😄

Validations

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions