Merge pull request #3101 from ndarville/patch-1

This commit is contained in:
Matt Rogers 2014-11-13 21:34:31 -06:00
commit 27362a1984
1 changed files with 11 additions and 2 deletions

View File

@ -23,8 +23,8 @@ Plugins/themes can also leverage Data Files to set configuration variables.
As explained on the [directory structure](../structure/) page, the `_data` As explained on the [directory structure](../structure/) page, the `_data`
folder is where you can store additional data for Jekyll to use when generating folder is where you can store additional data for Jekyll to use when generating
your site. These files must be YAML files (using either the `.yml`, `.yaml` or `.json` your site. These files must be YAML files (using either the `.yml`, `.yaml`, `.json`
extension) and they will be accessible via `site.data`. or `csv` extension) and they will be accessible via `site.data`.
## Example: List of members ## Example: List of members
@ -44,6 +44,15 @@ In `_data/members.yml`:
github: liufengyun github: liufengyun
{% endhighlight %} {% endhighlight %}
Or `_data/members.csv`:
{% highlight csv %}
name,github
Tom Preston-Werner,mojombo
Parker Moore,parkr
Liu Fengyun,liufengyun
{% endhighlight %}
This data can be accessed via `site.data.members` (notice that the filename This data can be accessed via `site.data.members` (notice that the filename
determines the variable name). determines the variable name).