Last Modified Time
Output the last modified time of a document
Usage
This feature is not enabled by default, you can enable this in next.config.mjs
. Notice that it only supports Git as version control.
When using git
, please ensure you have Git installed on your local machine and the repository is not shallow cloned as it relies on your local Git history.
Access the Property
After doing this, a lastModified
number will be exported for each document, you can convert it to a JavaScript Date object.
Last updated on