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

Automated publishing of future-dated posts #170

Open
altsalt opened this issue Mar 12, 2020 · 9 comments
Open

Automated publishing of future-dated posts #170

altsalt opened this issue Mar 12, 2020 · 9 comments

Comments

@altsalt
Copy link
Member

altsalt commented Mar 12, 2020

Looks like #169 went live despite being future dated. Isn't a big deal, but might be nice to fix for queuing when we get closer to the event.

@nhandler
Copy link
Contributor

Running the site in Docker did not exhibit this issue. Is it possible this is due to some datetime issue on the actual seagl.org site rather than in the code?

@kormoc
Copy link
Contributor

kormoc commented Mar 12, 2020

Jekyll is a static site generator. It runs after every commit and the results are published to the site. The dates on the posts are really for sorting, not for holding on to until a specific date. There's no system in place to re-run the Jekyll build process to publish pending posts automatically.

@nhandler
Copy link
Contributor

So wouldn't the expected behavior be that the future doesn't get included when jekyll runs since we haven't hit that date? That is what happens when running with Docker.

This also feels like a change/regression. There is a large note in the README from @vmbrasseur (21ea91d) specifically calling out the ability to use future dating to schedule posts. If this no longer works, we should remove the note at the very least. However, ideally, we would be able to support this workflow (potentially using GitHub Actions, which also support running on a schedule).

@kormoc
Copy link
Contributor

kormoc commented Mar 12, 2020

I don't know exactly the command line GitHub renders Jekyll with, but there is a argument you can pass in called --future that will render future pages.

https://jekyllrb.com/docs/configuration/options/

When you are calling it via docker, it's not set in our config file or being set in the command line, so it's not rendering then. I can only assume that GitHub has this enabled by default. We could open a ticket with them to see if they know why this changed or why it's happening.

@AndrewKvalheim
Copy link
Member

AndrewKvalheim commented Mar 12, 2020

So wouldn't the expected behavior be that the future doesn't get included when jekyll runs since we haven't hit that date?

Yes.

I can only assume that GitHub has [--future] enabled by default.

Odd. I don't see anything about that in the GitHub Pages documentation, but at least one other person has noticed a discrepancy:

However, your future posts will be shown in GitHub Pages. I couldn’t check the detail but it seemed the default Jekyll setting is different between a local and GitHub Pages. So, please don’t forget to set false to hide future posts correctly.

future: false

@AndrewKvalheim
Copy link
Member

Seems to have worked.

@nhandler
Copy link
Contributor

This still seems to be broken. The post has yet to appear. I'm not sure if we need to force some other change to the site to cause it to be regenerated/redeployed or if something else is broken.

@nhandler nhandler reopened this Mar 17, 2020
@meonkeys
Copy link
Member

I just pushed an unrelated commit ( ab89c61 ). That forced a site rebuild/deploy and now the videos post shows up.

Also: https://stackoverflow.com/questions/24098792/how-to-force-github-pages-build/24099328#24099328

@nhandler
Copy link
Contributor

Cool. I'll update the docs about scheduling posts for future publication to call this out. I still wonder though if we could utilize something like GitHub Actions and have them force a daily rebuild to facilitate truly automated scheduled posts again.

@AndrewKvalheim AndrewKvalheim changed the title Jekyll blog post future dates don't seem to be functioning Automated publishing of future-dated posts Apr 5, 2021
nhandler pushed a commit to nhandler/seagl.github.io that referenced this issue Nov 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants