Closed julien-deramond closed 4 months ago
The latest updates on your projects. Learn more about Vercel for Git ↗︎
Name | Status | Preview | Comments | Updated (UTC) |
---|---|---|---|---|
starlight-blog-docs | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | Jul 2, 2024 4:20pm |
Describe the pull request
This PR adds an optional new
updateDate
field for blog posts to define the last update that happened.Why
This information can be interesting for readers when blog posts have been updated after feedback from the readers, typos, changes of URL, or adaptation for whatever reason.
How
packages/starlight-blog/schema.ts
has been updated to add a newupdateDate
field which is an optional datepackages/starlight-blog/libs/content.ts
has been modified to include this new fieldupdateDate
value has been treated like thedate
value and is handled inpackages/starlight-blog/components/Metadata.astro
:var(--sl-text-xs);
updateDate
is not rendered if it's not defined, or that its content has the same value as the publicationdate
docs/src/content/docs/blog/vario-nunc-polo.md
anddocs/src/content/docs/blog/sequantur-quaeritis-tandem.md
lastBuildDate
for the channels. Plus, I don't think we need to modify thepubDate
to use theupdateDate
as it would modify the order of appearance of the blog posts, even if it is mentioned thatpubDate
is supposed to be the "last-publication" date for the item. I'm not 100% sure about it, but I would handle it like this.Some links
updateDate
as thedate
, so theupdateDate
is not renderedupdateDate
, so it is renderedupdateDate
, so it's not renderedScreenshots