yosymfony/spress-plugin-dataloader

Dataloader plugin for Spress

v1.0.0 2014-01-11 19:34 UTC

README

Loads data located at _data/ folder of your site.

How to install?

Go to your Spress site and add the following to your composer.json and run composer update:

"require": {
    "yosymfony/spress-plugin-dataloader": "~1.0"
}

How to use?

Go to your Spress site an create _data folder. In this folder you can to create JSON that will be available in site.data.<yourFilename>.

Example with a users array:

_data/
|- blogUsers.json

In your Twig templates, you can access to this data:

{% for theme in site.data.blogUsers %}
...
{% endfor %}