Skip to content

Editing Data

Torbjörn Klatt edited this page Feb 18, 2016 · 7 revisions

A small drawback of static site generators is the absence of a "real" database engine (e.g. relational DBs such as MySQL).
Jekyll provides the use of a data directory (_data) with custom database files in the YAML format.

The content of each these files is accessible via [[Liquid variables|Markup Language#liquid-variables]] site.FILENAME.

Some of the databases are used for validation to prevent typos resulting in silent errors when building the site. This is mostly the case for the event categories (_data/event_kind.yml), people's positions (_data/positions.yml) and project statuses (_data/project_statuses.yml).
Others are used for a uniform display of recurring names, such as JLESC's partners (_data/institutes.yml).
And finally, some are actual databases such as people (_data/people.yml) and visits (_data/visits.yml).

For the actual data format, please see the comment at the top of each of the data files. Please, make yourself familiar with the YAML syntax.

These are the data files and their purpose:

File Purpose
_data/event_kind.yml each [[event
_data/institutes.yml
_data/people.yml
_data/positions.yml
_data/project_states.yml
_data/topics.yml
_data/visits.yml