Open mkamsani opened 1 year ago
Manually editing the last updated date may (eventually) become difficult to maintain.
The last updated date p_updated
of a published blog post can be replaced with a link to revision history:
https://ben.balter.com/2023/03/02/github-for-non-technical-roles/
In the post above, Ctrl + F "View revision history"
for an example of linking a blog post to its file history.
Ideally, the file names for blog posts shouldn't be changed, once they're committed to our site.
An alternative is to embed a shell script at build time to obtain the last commit to the file:
https://github.com/shelljs/shelljs
git log -1 --format=%cd ./my-blog-post.md # /src/content/post/my-blog-post.md
Schemas enforce certain metadata in contents of the site.
See src/content/config.ts for context:
The above schema needs to be converted to content collections format.
Some of these values can be set as optional.