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
Document that _drafts need to be contained within the custom collection directory #6985
Document that _drafts need to be contained within the custom collection directory #6985
Conversation
9df2cff
to
49107fd
Compare
lib/jekyll/commands/doctor.rb
Outdated
Jekyll.logger.warn "", | ||
"Please move '#{posts_at_root}' into the custom directory at " \ | ||
"Please move '#{directories.join("', '")}' into the custom directory at " \ |
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.
Does this even make sense?
Still doing baby steps in Ruby, apologies when I'm doing it wrong.
π€
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.
What is the desired output here?
Please move '_drafts, _posts' into the custom directory at..
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.
I think it should be
Please move '_drafts', '_posts' into the custom directory at..
but only if both _drafts
and _posts
where detected outside the custom collections directory.
Am I doing it wrong? I thought it would be better to combine this into single messages, rather than rendering the same message with different directories. What do you think, @ashmaroli?
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.
To discover (and learn Ruby along the way) the output to your code, you try simple code in your terminal itself..
- In you terminal, run
irb
- Then execute
["_drafts", "_posts"].join("', '")
and see how the output looks like..
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.
Testing for _posts
and _drafts
separately is the best solution. For that create a new method for _drafts
and then extract the common steps between the two into a private
helper method..
@localheinz The maintainers may not release a |
1233181
to
1a4d272
Compare
1a4d272
to
3f1edb5
Compare
Thank you for your feedback! Pulled out the changes to the doctor command into a separate pull request, see #6986. |
f5fef9c
to
f360951
Compare
@jekyllbot: merge +docs |
This PR
_posts
directory into the custom collection directory to also move the_drafts
directoryFollows #6680.
πββοΈ Tripped over this, apparently tests for it exist, see
jekyll/features/collections_dir.feature
Lines 67 to 161 in 41fa9cd