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

feat: hide posts when PubDateTime is not reached #234

Closed davlgd closed 5 months ago

davlgd commented 5 months ago

If the pubDateTime is not reached:

The scheduledPost are visible 15 minutes before pubDateTime by default, to let the time to rebuild the website. It can be set as a config SITE variable: scheduledPostMargin

Fix #233

satnaing commented 5 months ago

Thanks for this. I just made some changes and merged it.

SSmale commented 5 months ago

what needs to happen for these to show at the right time. My understanding was that it produced the html and that was it until the next time the site was built?

davlgd commented 5 months ago

posts page are available (for preview, early access link) but not shown until rebuild. As it's a static site, you'll have to launch a new build for new posts to be shown on index/tags/search, etc. (could be done through CRON for example, as I do)