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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: Add note about posts in context of collections_dir #6680

Merged
merged 1 commit into from Jan 7, 2018

Conversation

localheinz
Copy link
Contributor

@localheinz localheinz commented Jan 7, 2018

This PR

  • adds a warning about the _posts directory in the context of specifying a custom collections_dir

Follows #6331.
Related to #6678.
Follows #6679 (comment).

screen shot 2018-01-07 at 12 18 53

@localheinz localheinz force-pushed the fix/documentation-collections branch 2 times, most recently from 6764d0e to 78d9d02 Compare January 7, 2018 07:39

<p>Then Jekyll will look in <code>my_collections/_books</code> for the <code>books</code> collection, and
in <code>my_collections/_recipes</code> for the <code>recipes</code> collection.</p>
in <code>my_collections/_recipes</code> for the <code>recipes</code> collection. Since posts and drafts are collections as well, you will need to move the <code>_drafts</code> and <code>_posts</code> directories into <code>my_collections</code> as well.</p>
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Should we turn this into a warning?

Copy link
Member

Choose a reason for hiding this comment

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

drafts are not a collection! They're just a temporary holding..

Copy link
Member

Choose a reason for hiding this comment

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

I've updated my previous PR to confirm that drafts at the root are processed even when a custom collections_dir is set..

Copy link
Contributor Author

@localheinz localheinz Jan 7, 2018

Choose a reason for hiding this comment

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

@ashmaroli

How about the issue, though, that when you have collections in a custom collections directory and posts at the root, that the posts will have a draft status (regardless of whether publishing date is in the past or not)?

Ha, never mind.

@localheinz localheinz changed the title Fix: Add note about posts in context of collections_dir Fix: Add note about drafts and posts in context of collections_dir Jan 7, 2018

<p>Then Jekyll will look in <code>my_collections/_books</code> for the <code>books</code> collection, and
in <code>my_collections/_recipes</code> for the <code>recipes</code> collection.</p>
in <code>my_collections/_recipes</code> for the <code>recipes</code> collection. Since posts and drafts are collections as well, you will need to move the <code>_drafts</code> and <code>_posts</code> directories into <code>my_collections</code> as well.</p>
Copy link
Member

Choose a reason for hiding this comment

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

drafts are not a collection! They're just a temporary holding..

@localheinz localheinz force-pushed the fix/documentation-collections branch from 78d9d02 to d1e88f0 Compare January 7, 2018 11:05
@localheinz localheinz changed the title Fix: Add note about drafts and posts in context of collections_dir Fix: Add note about posts in context of collections_dir Jan 7, 2018
@localheinz localheinz force-pushed the fix/documentation-collections branch 2 times, most recently from 9e609f4 to a73793f Compare January 7, 2018 11:10
<h5>Be sure to move posts into custom collections directory</h5>

<p>If you specify a directory to store all your collections in the same place with <code>collections_dir: my_collections</code>, then you will need to move your <code>_posts</code> directory to <code>my_collections/_post</code>.</p>
</div>
Copy link
Member

Choose a reason for hiding this comment

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

small typo..

- you will need to move your <code>_posts</code> directory to <code>my_collections/_post</code>.
+ you will need to move your <code>_posts</code> directory to <code>my_collections/_posts</code>.

@localheinz localheinz force-pushed the fix/documentation-collections branch from 63180b1 to 6793402 Compare January 7, 2018 11:17
@localheinz
Copy link
Contributor Author

@ashmaroli

Already done!

@ashmaroli
Copy link
Member

/cc @jekyll/documentation

@lgp36018
Copy link

lgp36018 commented Jan 7, 2018

Please unsubscribe the email for the above account.

@DirtyF
Copy link
Member

DirtyF commented Jan 7, 2018

Thanks @localheinz, this should save some headache to many people 😓

@jekyllbot: merge +docs

@jekyllbot jekyllbot merged commit a8a6230 into jekyll:master Jan 7, 2018
@localheinz
Copy link
Contributor Author

Thank you, @ashmaroli, @DirtyF, and of course, @jekyllbot!

@localheinz localheinz deleted the fix/documentation-collections branch January 7, 2018 11:41
@jekyll jekyll locked and limited conversation to collaborators Jul 12, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants