Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Support posts as index file in post-specific directory (Issue 511) #607

wants to merge 2 commits into


None yet
3 participants

kevinoid commented Jul 17, 2012

The attached commits add support for posts named index.extension inside a directory which follows the naming convention for posts and contains the post information. As suggested in Issue #511, this would allow authors to store content associated with the post alongside the post content file to ease the process of managing files in some cases.

Note that these changes do not add any support for copying post content files. That may be implemented later, or done using plugins (e.g. https://gist.github.com/3131752).

kevinoid added some commits Jul 17, 2012

@kevinoid kevinoid Add support for posts as subdirectories
In addition to supporting posts as single files, allow posts to be the
index file of a directory named for the post.  Require the same naming
conventions for the directories as was required for the files.

This feature was requested in Issue 511.  I foresee the main use for
this feature as allowing users to more easily manage content associated
with a single post by placing it all in the same directory and without
the need to duplicate the post name in the filename and containing

Functionality for dealing with the post content may be provided by
plugins or future commits.  This patch only provides support for post
file naming.

Signed-off-by: Kevin Locke <kevin@kevinlocke.name>
@kevinoid kevinoid Tighten post filename matcher expression
Now that directories are allowed to contain the post name data, several
of the questionable names allowed for posts will incorrectly match post

Correct the following:
 - Require post slug to be non-empty
 - Disallow directory separator in slug
 - Disallow directory separator in extension

Signed-off-by: Kevin Locke <kevin@kevinlocke.name>

parkr commented Dec 22, 2012

Ref: #511.


parkr commented Mar 17, 2013

This is certainly interesting! We already have a pretty well-defined setup and I think we're happy with it. I'm going to close this for now unless @mojombo disagrees.

@parkr parkr closed this Mar 17, 2013


kevinoid commented Mar 17, 2013

Ok. Does that mean #511 will be closed as well, or is there an alternative implementation that you would find more palatable?


parkr commented Mar 17, 2013

I don't feel comfortable making these changes without strong support from @mojombo. I closed #511.

If he does decide he wants this, then this PR is nearly perfect. We'll just ask that you explicitly test that the post name is parsed properly.


kevinoid commented Mar 17, 2013

Sounds good. Thanks for the update.

@jekyllbot jekyllbot locked and limited conversation to collaborators Feb 27, 2017

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.