Open Josh-Cena opened 3 years ago
Agree that using frontmatter options to override defaults is a good idea.
With a createFrontMatter()
option that I'd like to add, this would also allow users to provide their own code logic, eventually reading it from SVN/Mercurial/CMS/other systems.
I will probably build this feature myself after the createFrontMatter()
landed, since then we can get rid of the hard-coded last updated generation method and just inject that as a default
@slorber proposed in #7263 a similar API:
last_update:
author: string
date: string
I think that makes sense as well. We can possibly add other data in this namespace. Maybe we can even extend it to a history
API if people want the last few revisions? (See #6218)
history:
# First item: creation
- author: ...
date: ...
- author: ...
date: ...
# Last item: last update
- author: ...
date: ...
Now that createFrontMatter()
is probably not coming through in the near future, we can implement this first, just without an automated way to fill it.
I would like to work on this. Should I implement the history or only the last update?
@dpang314 Let's start with a back-compatible lastUpdate
first.
Will do.
A new "created" metadata (using git history)
The "created" metadata can be used to differentiate between "new" pages and "deprecated" pages.
As we discussed on discord, I'm not sure to understand the use-case for this 🤪
In any case, making it possible for users to access a "created" metadata might have some benefits, just not sure to understand yet how it would be used in practice.
Dear friends, I am very happy with your kindness. I hope that together we will achieve the desired results and have a very good recovery. Friends, if you have any problems, please send me a message. I will be very happy to be able to serve my loved ones. May our family and others take good advantage of this website and benefit from it. In the hope of health, happiness and happiness. Blessings, victory, pride and honor for all your loved ones and families. May your night and day be full of God's blessings and love. May you all be under the shadow of God's love and kindness.
Hi-- I'm interested in working on this. It seems like it would be pretty simple... yeah? I'll give it a shot over the next lil' bit and let you know how far I get.
🚀 Feature
Two things:
Have you read the Contributing Guidelines on issues?
Yes
Has this been requested on Canny?
Requested multiple times on Discord
Motivation
The "created" metadata can be used to differentiate between "new" pages and "deprecated" pages. "Last updated" shouldn't be entirely relying on git history since that can be buggy sometimes.
API Design
Front matter options:
New config options
showCreateTime
andshowCreateAuthor
The implementation of "create time" shouldn't be too hard with git, but it can also be messed up in versioning, so🤷♂️ Front matter metadata FTW
Have you tried building it?
No