Available for Jekyll sites.
Create and manage Jekyll data files in CloudCannon.
Data files are YAML, JSON or CSV files located in the /_data
directory. Use them to separate content from source code.
The use cases for data files include: office locations, restaurant menus, staff members and opening hours.
The Content Editor is an easy-to-use editor that supports data files. To access the interface:
- Add a Jekyll site with at least one data file
- Open the file from Collections / Data section
Developers have access to the raw contents with the Source Editor.
The editor adapts to the type of data file opened:
CSV
A spreadsheet-like interface.
/_data/offices.csv
:
latitude,longitude,name
-45.878760,170.502798,Dunedin
-41.286460,174.776236,Wellington
-46.098799,168.945819,Gore
-46.413187,168.353773,Invercargill
-35.117330,173.267559,Kaitaia
YAML and JSON
Group of input fields, similar to Front Matter.
/_data/staff.yml
:
- name: George Phillips
email: george@cloudcannon.com
- name: Mike Neumegen
email: mike@cloudcannon.com
- name: Ross Phillips
email: ross@cloudcannon.com
/_data/staff.json
:
[
{
"name": "George Phillips",
"email": "george@cloudcannon.com"
},
{
"name": "Mike Neumegen",
"email": "mike@cloudcannon.com"
},
{
"name": "Ross Phillips",
"email": "ross@cloudcannon.com"
}
]