Fix loading data from subdir with a period in name #5433

Merged
merged 2 commits into from Oct 6, 2016

Projects

None yet

3 participants

@ayastreb
Contributor
ayastreb commented Oct 1, 2016

Fix #5429
If we're processing a directory - use it's name as a key.

@ayastreb ayastreb Fix loading data from subdir with a period in name #5429
cff8f29
@ayastreb ayastreb changed the title from Fix loading data from subdir with a period in name #5429 to Fix loading data from subdir with a period in name Oct 1, 2016
lib/jekyll/readers/data_reader.rb
if File.directory?(path)
- read_data_to(path, data[key] = {})
+ read_data_to(path, data[entry] = {})
@parkr
parkr Oct 3, 2016 Member

I think we might still need to do sanitize_filename here to make this accessible in Liquid.

@ayastreb
ayastreb Oct 3, 2016 Contributor

ok, so "categories.01" will become "categories01", right?

@parkr
parkr Oct 3, 2016 Member

Yes! I believe having .'s in the key is not acceptable.

@parkr parkr added the fix label Oct 3, 2016
@ayastreb ayastreb Sanitize directory name as a key
e27a65d
@parkr
parkr approved these changes Oct 6, 2016 View changes

Nicely done! 🎉

@parkr
Member
parkr commented Oct 6, 2016

@jekyllbot: merge +bug

@jekyllbot jekyllbot merged commit 6f05ebb into jekyll:master Oct 6, 2016

1 of 2 checks passed

continuous-integration/appveyor/pr AppVeyor build failed
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@jekyllbot jekyllbot added bug fix labels Oct 6, 2016
@parkr parkr added this to the 3.3 milestone Oct 6, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment