diff --git a/features/data.feature b/features/data.feature index e44be8a5..41f476a4 100644 --- a/features/data.feature +++ b/features/data.feature @@ -59,6 +59,20 @@ Feature: Data And I should see "Jack" in "_site/index.html" And I should see "Leon" in "_site/index.html" + Scenario: autoload *.tsv files in _data directory + Given I have a _data directory + And I have a "_data/members.tsv" file with content: + """ + name age + Jack 28 + Leon 34 + """ + And I have an "index.html" page that contains "{% for member in site.data.members %}{{member.name}}{% endfor %}" + When I run jekyll build + Then the "_site/index.html" file should exist + And I should see "Jack" in "_site/index.html" + And I should see "Leon" in "_site/index.html" + Scenario: autoload *.yml files in _data directory with space in file name Given I have a _data directory And I have a "_data/team members.yml" file with content: diff --git a/lib/jekyll/readers/data_reader.rb b/lib/jekyll/readers/data_reader.rb index 1083d62b..63db7c6d 100644 --- a/lib/jekyll/readers/data_reader.rb +++ b/lib/jekyll/readers/data_reader.rb @@ -19,7 +19,7 @@ module Jekyll @content end - # Read and parse all .yaml, .yml, .json, and .csv + # Read and parse all .yaml, .yml, .json, .csv and .tsv # files under