satnaing / astro-paper

A minimal, accessible and SEO-friendly Astro blog theme
https://astro-paper.pages.dev/
MIT License
2.13k stars 440 forks source link

refactor: Display "Update:" only if modDateTime more current than pubDateTime #258

Closed pickyzz closed 4 months ago

pickyzz commented 5 months ago

Hello, I usually create a new post with FrontMatterCMS (vscode plugin) which creates both pubDateTime and modDateTime at the same time in a new post.

Then I noticed that. When the time of both parts is the same. The page will show the word "Update". I would like to change this to show the word "Update" only if modDateTime is more current than pubDateTime.

Thank you for creating this theme. Hopefully, this small change will be beneficial to you.

satnaing commented 4 months ago

I thought no one would add modDatetime unless they update the blog post. Always good to hear the unexpected scenarios like this.

pickyzz commented 4 months ago

I apologize for the mistake. I was debugging for the first time on my blog and forgot to revert the null checking. I have made the corrections as you suggested and has been tested.

Thank you for your advice.

satnaing commented 4 months ago

Thanks for your contribution. Just merged. 🎉