-
Beta Was this translation helpful? Give feedback.
Answered by
Anh-bro
Mar 30, 2024
Replies: 1 comment 1 reply
-
Please verify if this is returning correct timestamp: git log -1 --pretty="%ai" "path/to/your/file.md" |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
thank you for your reply! I found the reason!
I added "lastUpdated: true" to the frontmatter of the markdown file.
I create another file without adding this key-value pair. After submitting, the correct time is displayed on the page.
Moreover, the last updated timestamp obtained using "useData" is correct.
It is because "lastUpdated: true" is added to frontmatter that the time on the page is displayed incorrectly.
Is this a bug? It seems to me that the description in the documentation is not accurate:
https://vitepress.dev/reference/frontmatter-config#lastupdated