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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add details in warning message to reveal --future switch #8112

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

dee-see
Copy link

@dee-see dee-see commented Apr 13, 2020

This is a 馃檵 feature or enhancement.

Summary

The warning that says "Skipping: POST has a future date" doesn't do anything to suggest that there's a way around that. jekyll serve --help does show that the --future switch exists, but I thought that adding it to the message would be helpful.

Context

Every 6 months I write a post for a future date, run bundle exec jekyll s to verify it locally, see that my post isn't posted and wonder if there's a way around it. This would help my brain. ;)

Not sure if you're really interested in this, but throwing it out there just in case. Thanks!

Add details in warning for posts that have a date in the future to reveal the --future switch
@@ -76,7 +76,7 @@ def processable?(doc)
def publishable?(doc)
site.publisher.publish?(doc).tap do |will_publish|
if !will_publish && site.publisher.hidden_in_the_future?(doc)
Jekyll.logger.warn "Skipping:", "#{doc.relative_path} has a future date"
Jekyll.logger.warn "Skipping:", "#{doc.relative_path} has a future date, run jekyll with --future to publish anyway"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Jekyll.logger.warn "Skipping:", "#{doc.relative_path} has a future date, run jekyll with --future to publish anyway"
Jekyll.logger.warn "Skipping:", "#{doc.relative_path} has a future date. You can pass --future option if you want to publish posts with a future date."

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like the idea of providing docs from the CLI, but here this might be too verbose and not a so common use case.

@jekyll/core Do we really need to enhance our warning here?

@DirtyF DirtyF added the ux label Jan 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants