-
-
Notifications
You must be signed in to change notification settings - Fork 10k
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
Future should be set to false in the default config #3892
Conversation
87c4942
to
49c3a6c
Compare
@@ -26,7 +26,7 @@ class Configuration < Hash | |||
# Filtering Content | |||
'show_drafts' => nil, | |||
'limit_posts' => 0, | |||
'future' => true, # remove and make true just default |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh interesting... it looks like we were going to remove it anyway. Looks like #690 is where we wrote that comment. I'm cool on keeping it.
Cool. Just needs a test, please! |
@parkr I'm a little confused. You're asking me to test that Jekyll::Configuration::DEFAULTS['future'] == false? I can't find any similar tests that test what the DEFAULTS constant is set to. Can you give me some guidance on what kind of test you're looking for? |
Yes I am, but not directly. I would like to see a test that ensures that a post in the future is not in the output site. This can be tested in a number of ways, one of which is a cucumber feature. The test you changed, in fact, is a good place to start. Write a post that has a year of 2020 and ensure it isn't written by default and is written when |
/cc #3543 install a library that can alter time so we don't have to use Hollywood dating. |
49c3a6c
to
e6b8188
Compare
@parkr alright actual ping. Testing that a future post isn't written by default + it is written with jekyll --build. |
e6b8188
to
d20eae7
Compare
When I run jekyll build | ||
Then the _site directory should exist | ||
And I should see "URL: /2020/01/31/entry2/" in "_site/index.html" | ||
And I should see "URL: /2008/01/01/entry2/" in "_site/index.html" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe just negate this? "I should not see..."
Merged in 559cd6c |
Solves #3882