Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: hide posts when PubDateTime is not reached #234

Merged
merged 3 commits into from
Jan 15, 2024
Merged

Conversation

davlgd
Copy link
Contributor

@davlgd davlgd commented Jan 14, 2024

If the pubDateTime is not reached:

  • Post is not not shown in the index
  • Post's tags are not shown in the tags page
  • Post can't be found in search

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

@davlgd davlgd changed the title Hide posts when PubDateTime is not reached feat: hide posts when PubDateTime is not reached Jan 14, 2024
@satnaing satnaing merged commit 3efa05c into satnaing:main Jan 15, 2024
@satnaing
Copy link
Owner

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

@SSmale
Copy link
Contributor

SSmale commented Jan 16, 2024

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
Copy link
Contributor Author

davlgd commented Jan 16, 2024

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Schedule posts if pubDateTime has not been reached
3 participants