USRSE / USRSE/usrse.github.io

Allow future posts, maybe just for some collections?

Open
#917 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

content discussion-needed
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.