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
Conversation
docs/_docs/collections.md
Outdated
|
||
<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> |
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.
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
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.
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).
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.
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..)
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.
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 tomy_collections/_posts
. Note that if you do this, the name of your collections directory cannot start with an underscore (_).
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.
Thanks @paulrobertlloyd, 👍 for your last proposal
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.
Great. Do you need me to update this PR?
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.
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 tomy_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..
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.
@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.
Therefore, I'm of the opinion, please do not alter the existing note. Instead, add to it.. |
docs/_docs/collections.md
Outdated
|
||
<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> |
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.
Thanks @paulrobertlloyd, 👍 for your last proposal
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.
LGTM! 👍
@jekyllbot: merge +docs |
Clarifying situation in follow up to #6702. /cc @ashmaroli