Github training-kit uses a collections: concept that will allow us to represent the data on our site as objects. This will allow us to do something like list events, and then filter for readings or study_guides that belong to that event, and allow us to put in our _config.ymloutput: true to automatically generate html views for that collection on build.
More information on this type of content modeling here.
Why?
This will allow us to more logically represent data relationships in our code, instead of sticking to the simple idea of a post that jekyll encourages by default. It also lets us find related models with liquid templating without having to loop through our entire "database" of content.
Background
Github training-kit uses a
collections:
concept that will allow us to represent the data on our site as objects. This will allow us to do something like list events, and then filter forreadings
orstudy_guides
that belong to that event, and allow us to put in our_config.yml
output: true
to automatically generate html views for that collection on build.More information on this type of content modeling here.
Why?
This will allow us to more logically represent data relationships in our code, instead of sticking to the simple idea of a
post
that jekyll encourages by default. It also lets us find related models withliquid
templating without having to loop through our entire "database" of content.Example:
Data Map
_config.yml