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

Add note about naming of collections_dir #6703

Merged
merged 1 commit into from Jan 19, 2018

Conversation

Projects
None yet
4 participants
@paulrobertlloyd
Contributor

paulrobertlloyd commented Jan 18, 2018

Clarifying situation in follow up to #6702. /cc @ashmaroli

<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/_posts</code>.</p>
<p>If you want to move your `_posts` folder inside the custom collections directory as well, the name of the `collections_dir` cannot start with an underscore (_).</p>

This comment has been minimized.

@ashmaroli

ashmaroli Jan 18, 2018

Member

There is no scope for a "If you want to move _posts.."
Its always, "If you specify a custom directory.., then _posts has to be moved into it as well.."
and since _posts won't be read inside directories starting with an underscore, it implies:

Custom collections_dir cannot start with an underscore

This comment has been minimized.

@paulrobertlloyd

paulrobertlloyd Jan 18, 2018

Contributor

Hmmm, that’s not the behaviour I’m seeing. I can set a custom collections directory, and have my _posts folder outside of it. The problem only occurs if I move _posts into a the collections_dir (and it begins with an underscore).

This comment has been minimized.

@ashmaroli

ashmaroli Jan 18, 2018

Member

Please check the generated URL to your posts..
./_posts/2018-01-18-hello.md will have generated a ./_site/_posts/2018/01/18/hello.html .. (Note the _posts in your URL..)

This comment has been minimized.

@paulrobertlloyd

paulrobertlloyd Jan 19, 2018

Contributor

Ah yes, I hadn’t spotted that in my test site (and for my own purposes, I am using front matter defaults to explicitly set permalinks for posts). Okay, so how about this:

If you specify a directory to store all your collections in the same place with collections_dir: my_collections, then you will need to move your _posts directory to my_collections/_posts. Note that if you do this, the name of your collections directory cannot start with an underscore (_).

This comment has been minimized.

@DirtyF

DirtyF Jan 19, 2018

Member

Thanks @paulrobertlloyd, 👍 for your last proposal

This comment has been minimized.

@paulrobertlloyd

paulrobertlloyd Jan 19, 2018

Contributor

Great. Do you need me to update this PR?

This comment has been minimized.

@ashmaroli

ashmaroli Jan 19, 2018

Member

IMO, there's no need for two if statements..

If you specify a directory to store all your collections in the same place with collections_dir: my_collections, then you will need to move your _posts directory to my_collections/_posts. Note that, the name of your collections directory cannot start with an underscore (_).

Great. Do you need me to update this PR?

Yes. Please..

This comment has been minimized.

@paulrobertlloyd

paulrobertlloyd Jan 19, 2018

Contributor

@ashmaroli I wasn’t sure about that, but then realised we are adding this note within the context of moving _posts into the custom directory. So yes, no need for the extra ‘if’. I have updated this PR.

@ashmaroli

This comment has been minimized.

Member

ashmaroli commented Jan 18, 2018

Therefore, I'm of the opinion, please do not alter the existing note. Instead, add to it..
/cc @jekyll/documentation

@DirtyF

DirtyF approved these changes Jan 19, 2018

<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/_posts</code>.</p>
<p>If you want to move your `_posts` folder inside the custom collections directory as well, the name of the `collections_dir` cannot start with an underscore (_).</p>

This comment has been minimized.

@DirtyF

DirtyF Jan 19, 2018

Member

Thanks @paulrobertlloyd, 👍 for your last proposal

@paulrobertlloyd paulrobertlloyd changed the title from Note about naming of collections_dir if _posts folder contained within it to Note about naming of collections_dir Jan 19, 2018

@paulrobertlloyd paulrobertlloyd changed the title from Note about naming of collections_dir to Add note about naming of collections_dir Jan 19, 2018

@ashmaroli

LGTM! 👍

@DirtyF

This comment has been minimized.

Member

DirtyF commented Jan 19, 2018

@jekyllbot: merge +docs

@jekyllbot jekyllbot merged commit af88add into jekyll:master Jan 19, 2018

3 checks passed

WIP ready for review
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment