Update time proposal #7
Closed
Mister-Hope
started this conversation in
Ideas
Replies: 4 comments 2 replies
-
If you like the idea, I think you have the ability to done it yourself. |
Beta Was this translation helpful? Give feedback.
0 replies
-
Sounds great! |
Beta Was this translation helpful? Give feedback.
0 replies
-
Also, I think there should be an |
Beta Was this translation helpful? Give feedback.
2 replies
-
completed in 7a677cd |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I don't think
calcUpdatedTime
is a good name, and it's confusing.I have a proposal to change this with
updateTime: "git" | "file" | ((page: Page) => number | Date | undefined)
, with a default value of(page)=> page.data.git?.updateTime
Not all project are using git, the plugin could make a fallback for noob users to get updateTime from fileinfo if possible with the keyword
"file"
Also with the built-in keyword
"git"
, the plugin should readpage.data.git.updateTime
, and generate timestamp itself if the value does not exisits.The function also gives the user ability to handle complicated cases (e.g: with git submodule and other situations where users want to define a update time themselves like frontmatter.updateTIme)
Beta Was this translation helpful? Give feedback.
All reactions