-
Notifications
You must be signed in to change notification settings - Fork 0
Page and Post Metadata ๐ง
If you are unfamiliar what metadata is, and confused on why Rootbeer is throwing an error saying something about missing required metadata, then I would recommending reading the whole thing.
Metadata is data that will be at the start of pretty much every post and page in Rootbeer. It will tell Rootbeer, themes, and plugins data about the post that it would not have been able to know about. Like the date written or the title of the post.
Metadata in Markdown is YAML based, meaning the metadata syntax will look like YAML syntax. The metadata is encased in 3 '-'. Here is an example on how metadata works.
---
title: Epic post
type: post
date: 6/6/21 at 18:30
very cool metadata list:
- item 1
- item 2
---
# The metadata in the "---" will be ignored when parsed. Very neat!
There is one REQUIRED value for metadata:
This tells Rootbeer what type of content it is. The values can be only: post
or page
and that's it. Anything else could cause an error.
You can also change the metadata values that will throw an error if not present in the content by changing the list_of_required_metadata_fields
option in the config file.