Allow future posts, maybe just for some collections?
Nobody has claimed this yet.
- Dominant language
- HTML
- Stars
- 33
- Forks
- 104
- Avg merge
- 12h 3m
- Merged PRs (30d)
- 10
Description
Currently when we add posts to _events, we need to leave out a date from the title to get them to render immediately. See comment from @lparsons here:
https://github.com/USRSE/usrse.github.io/pull/911#pullrequestreview-1101293174
One issue is that if you use a full date for the events (with the day), Jekyl decides that this is a blog post that isn't ready to be published yet and won't render the page (thus the artifact is missing in CircleCI). Try renaming the file to _events/2022/2022-09-dei-media-club.md.
A way to avoid this would be to set future: true in _config.yml as suggested by @exoticDFT
https://github.com/USRSE/usrse.github.io/pull/911#issuecomment-1241381099
Do we actually care to post things that will only become available after a date? You can add an option to allow future posts. On another website I have, I just have an option at the root level of the _config.yml. I think you may be able to add it to the collection level instead. The option is below.
future: true
Not sure if there's a case where we want to hide any posts we are merging in at the moment?
But if so we might be able to add it a the collection level, as @exoticDFT suggests
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with _config.yml and the _events/2022/2022-09-dei-media-club.md example, then review the linked pull request discussion about Jekyll’s future-post behavior. Determine whether future-dated events should render while other collections remain hidden, and verify that the expected event page appears in the CircleCI artifact.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- jekyll
- Domain
- content
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100