Hey 👋🏻

My name is Christian, an Agile Developer, living in Trento (IT)

I write good code at Wonderflow

You can follow me on and Github


More about me 🤖




Loop jekyll data directory files

Jekyll will look into the _data directory.

Working with yml files is as easy as adding a file in this directory, and Jekyll will expose its contents on the site.data.[YML_FILE_NAME].

In this example, rendering a list of authors listed in a YML file is as easy as:

{% raw %}
          {% for authors in site.data.authors limit:8 %}
            {{ authors.name }}
          {% endfor %}
          {% endraw %}

The related Data file is located in _data/authors.yml with the following contents:

-
            name: Christian
            username: christian
          -
            name: admin
            username: admin