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 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 list of event categories used in an [[event's meta data
_data/institutes.yml list of institutes/partners in JLESC
_data/people.yml database of [[researcher participating in JLESC
_data/positions.yml list of valid positions of people at their home institute
_data/project_states.yml list of valid project states, such as "in preparation", "running" or "finished"
_data/topics.yml list of official research topics/fields in JLESC
_data/visits.yml database of [[research visits