Before we move on to creating an index of events, I've got a three-part assignment to get you more comfortable with GraphQL and how Gatsby sources data:
- Add a new type of
frontmatterto your example event Markdown file (the blog item in
/content/events, not the page). You'll need to add it to the query as well. You could add categories, tags — the sky's the limit!
- Change the date format in the page query to something more casual than
- Create 5 more events as Markdown files (for a total of 6 files in
/content/events). Use the format
YYYY-MM-DD-event-title.mdfor each file and add frontmatter and a bit of basic content for each one. Get creative!
We'll look at the solution in the next video.