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

Set a publish date at fragment level not just page level #178

Open
itowlson opened this issue Jul 24, 2023 · 2 comments
Open

Set a publish date at fragment level not just page level #178

itowlson opened this issue Jul 24, 2023 · 2 comments

Comments

@itowlson
Copy link
Contributor

Consider the following not entirely hypothetical scenario:

  • A site where it is desirable to schedule pages, for example to synchronise with an announcement or release
  • The site also has an index or table of contents with links to pages (manually updated rather than generated on the fly)

But if we future-date a page and merge it together with its TOC entry, the TOC entry is dangling! So we have to fall back to some unfortunate individual, say in Australia, having to stay up into the small hours to merge it at the right moment.

A possible way out of this would be to allow fragments to have publish dates. Then the TOC entry could be timed for the same moment as the new page.

This could also help with page changes, where you want to add a piece of content to an existing page, but only have that content appear at the prescribed time.

The downside of this approach is that if publish-by dates are kept around, pages end up as a mass of "hide until 4 October 1973" scar tissue, so users of this feature would need to be diligent about cleaning up! So if there is a more self-sustaining way to do this then that would be even more betterer...!

@karthik2804
Copy link
Contributor

This is already possible with the help of rhai scripts since this PR was merged.

It would require the content in question to be wrapped with an if statement calling a rhai script that returns if the the current date exceeds the set date.

@itowlson
Copy link
Contributor Author

Oooh! Nice!

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

No branches or pull requests

2 participants