Hi, folks. I’m trying to fit Jekyll to my workflow for scheduling posts in the future. Yes, I know about the
future switch and the
future attribute of posts and about settings dates on posts. I want to combine two somewhat contradictory things that create confusion and I wanted to know whether I can do this without writing my own Liquid post filter.
I want to schedule a post in the future, then schedule a tweet with Buffer that promotes that post. I want Buffer to be able to use the nice Twitter card extras for that post, such as a featured image and a summary. I want to schedule that tweet now, which means that (is this true?!) I need to have already published the post on my Jekyll blog so that Buffer will find the necessary image and summary for the tweet that creates the nice-looking Twitter card.
If the post link isn’t live when I schedule the tweet, then I don’t get the nicey-nicey stuff, but rather a plain link to a post that will have been published by the time Buffer sends the tweet. Good, but not good enough.
Because of this, I need Jekyll to publish future posts. (I have configured that. Alternatives?) But I don’t want future posts to show up in post lists (examples: welcome page, archive, archive by category), so I have to filter future posts out of
site.posts in order to be able to list them. Here is where I want a filter: I don’t see how to do “select all posts not in the future and take the 10 most recent” with the available Liquid/Jekyll features. I end up having to do this: “select all posts and take the 10 most recent”, then in the loop “if this post is not in the future…”. If I have 10 scheduled posts, then I would have ZERO posts on my welcome page. Disastrous!
So I would really like to be able to select all posts not in the future and take the 10 most recent. Can I do this with the pieces already available in Jekyll or do I need to write my own Liquid filter that does this query? I’m thinking of calling these posts “listed”/“unlisted”.