Skip to content

Editing Data

Torbjörn Klatt edited this page Feb 19, 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 read the comment at the top of each of the data files.

Please, make yourself familiar with the YAML syntax. To aid your editing, we recommend a text editor capable of highlighting 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 including some meta information such as affiliation, position at home institute, research interests and email address
_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 from one JLESCee to another JLESCee

Editing People

The same steps apply as for adding new content. Make sure you have read and understood the Contributor's Workflow. Especially, make sure, you have updated your local copy.

The following steps are to be done in Step 2 of the Contributor's Workflow, after you have switched onto a separate branch.

  1. Open the file _data/people.yml in your favourite text editor capable of highlighting YAML syntax.

  2. Read the comment at the top of the file very carefully.

  3. Make your edits.

See the file _data/positions.yml for referencing a person's position at his or her home institute and the file _data/institutes.yml for referencing a person's affiliation.

Continue with Step 3 of the Contributor's Workflow.

Editing Visits

The same steps apply as for adding new content. Make sure you have read and understood the Contributor's Workflow. Especially, make sure, you have updated your local copy.

The following steps are to be done in Step 2 of the Contributor's Workflow, after you have switched onto a separate branch.

  1. Open the file _data/visits.yml in your favourite text editor capable of highlighting YAML syntax.

  2. Read the comment at the top of the file very carefully.

  3. Make your edits.

See the file _data/people.yml for referencing the visitor and host.

Continue with Step 3 of the Contributor's Workflow.