HiDeoo / starlight-blog

Starlight plugin to add a blog to your documentation
https://starlight-blog-docs.vercel.app
MIT License
159 stars 21 forks source link

Make Blog Updates available #72

Open trueberryless opened 3 months ago

trueberryless commented 3 months ago

Is your feature request related to a problem?

Currently the only way of letting readers know that the blog was updated after its creation is the lastUpdated frontmatter, which isn't pretty obvious to find on the bottom of the page.

Some common blog websites have an extra field for the updated date and I think it wouldn't be that hard to integrate a new frontmatter or rewrite the current one with a field displayed next to the creation date for an updated date (not required of course).

Describe the solution you'd like

A frontmatter prop (like dateUpdated) which displays the date next to the creation date (date frontmatter), so that the reader quickly sees that there have been changes (recently)...

Describe alternatives you've considered

If nobody needs this, than I'll stick to the lastUpdated frontmatter, but still would be happy to some this small feature implemented in some future... (maybe in another universe...)

Additional Context

No response

HiDeoo commented 3 months ago

Thanks for the feedback :raised_hands:

The plugin actually used to have an updateDate extra field but this turned out to be confusing with the already existing lastUpdated from Starlight. I've made the decision to only keep lastUpdated at the moment. I'm also currently thinking about potentially moving that update date (for blog posts only) near the creation date like you suggested but I've not made a decision on that yet.

I'll keep the issue around as a reminder for a potential enhancement :thumbsup:

trueberryless commented 3 months ago

The idea of moving the lastUpdated field LGTM

trueberryless commented 3 months ago

One design choice I would like to discuss further is the separation character used:

In #75 I chose the character because I think it looks better than the simple dash -:

image

However, @HiDeoo you chose the - string, which is totally fine, but I would like to make it consistent (and I'd love to see the symbol...

image