mirror of
https://github.com/jekyll/jekyll.git
synced 2026-02-19 02:44:29 -05:00
Merge pull request #3101 from ndarville/patch-1
This commit is contained in:
@@ -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`
|
||||
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`
|
||||
extension) and they will be accessible via `site.data`.
|
||||
your site. These files must be YAML files (using either the `.yml`, `.yaml`, `.json`
|
||||
or `csv` extension) and they will be accessible via `site.data`.
|
||||
|
||||
## Example: List of members
|
||||
|
||||
@@ -44,6 +44,15 @@ In `_data/members.yml`:
|
||||
github: liufengyun
|
||||
{% 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
|
||||
determines the variable name).
|
||||
|
||||
|
||||
Reference in New Issue
Block a user