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

[infra] Consider displaying future pages like blog post and announcements, at least conditionally #5016

Open
Tracked by #5137
chalin opened this issue Aug 9, 2024 · 0 comments
Labels
CI/infra CI & infrastructure discussion Input from everyone is helpful to drive this forward
Milestone

Comments

@chalin
Copy link
Contributor

chalin commented Aug 9, 2024

I had turned off the Hugo generation of future posts (controlled by the -F, --buildFuture flag) because I wanted PR previews to show banners as they would appear in production. But, while attempting to review #4996, I see how useful it can be to support the preview of pages scheduled for publication at a future date.

There are a number of ways to approach this. Here are some thoughts:

  • Always generate future pages. Con: preview doesn't reflect that the production server will look like once the PR is merged.
  • Always generate future pages, but have them conditionally displayed in one's browser (using a CSS class that we use to toggle the page or announcement display)
  • Render the build commands sensitive to a marker (a bit like the /fix:* commands), that would allow us to control (either through the PR title, or comment, or something similarly easy to update while viewing the PR) whether Hugo builds with --buildFuture. Note that we don't build via a GH workflow; it's Netlify that builds and deploys previews, so what ever trigger mechanism we adopt, the Netlify build process needs to be able to have easy access to the trigger source (be it PR title, etc).

Thoughts?

@chalin chalin added the CI/infra CI & infrastructure label Aug 9, 2024
@chalin chalin added the discussion Input from everyone is helpful to drive this forward label Aug 9, 2024
@chalin chalin added this to the 24Q4 milestone Aug 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI/infra CI & infrastructure discussion Input from everyone is helpful to drive this forward
Projects
Status: No status
Development

No branches or pull requests

1 participant