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
when --verbose is on and future=false (now default), a message should be logged when a post is skipped for publishing #4178
Comments
IMHO, a message should be delivered if a post is skipped for future publishing, whether or not verbose is on. I intend to write a hook to do just this though. At the very least though, if I have turned on |
Great idea! |
For verbose it's understandable and was probably an oversight, I agree, we need a fix and I'm sure @jekyll/core will agree, for non-verbose the simple answer should be "no", we don't show you when a unique post is processed when not verbose, why would we show you when a unique post is not processed when not verbose? |
@envygeeks you're right about non-verbose. Still, my application needs a warning for when a blogpost is timestamped in the future and won't be published. Eh, I can write a hook to do just that. Except...
Jekyll::Hooks.register :posts, :post_init do |post|
if post.respond_to?(:date) && post.site.future
puts post.date
end
end
edit: I got creative: Jekyll::Hooks.register :documents, :post_init do |doc|
doc.read
if doc.respond_to?(:date) && !doc.site.future
if doc.date.to_i > doc.site.time.to_i
puts "#{doc.path} will not be published! Date #{doc.date} set after today/now!".yellow
end
end
end Consider this a 👍 for a hook for after reading documents. |
I thought we had processing hooks? |
I was looking here for whatever hooks were available. |
Minor feature request, title says it all:
If I am running
--verbose
and--future
is false (which is now the default), I should at least get a message in the verbose logs informing me that a post is being skipped for publishing.The text was updated successfully, but these errors were encountered: