Each page is made up of two sections. The first section is the header and is made up of YAML Front Matter. This establishes directives on how the page should act in the system and can be used to override system defaults. The second section contains the markup of the page which can be a combination of Markdown, HTML and BBCode markup.
Each page has a number of variables that can be set. These control how the page works and different metadata. Page headers are written in YAML (YAML Ain't Markup Language). Unlike HTML or XML, YAML provides a medium that is both human and machine readable but is compact and freeform. Page Headers contain information that we don't want to show the end user without further processing. Each variable cane be access via the page array in the TWIG templates for the site. Here is the format of the page headers in use:
--- title: Chapter Title slug: chapter_title template: chapter taxonomy: category: chapter_category tag: - tag1 - tag2 - tag3 content: items: '@taxonomy': category: chapter_category ---
Each variable is separated from its value with a colon (:). Using tabs tells the system to either insert a new value into the variable array or create a new sub-array depending on the format. If a variable has more than one value, then each value should be indented one level and proceeded with a dash (-). One value per line allows it to be read easier.
Multi-level arrays are supported. See the content variable above. Each key would be on its own line and indented one tab in relation to its parent.
Variables and their values are case sensitive. If you must use punctuation in either, surround them with single quotes.
The CMS supports a number of variables within the Front Matter to override defaults or control how the page works. We are not using them all at this time. Here are the ones that are currently being used.
Sets the title of the page. We support spaces and capital letters within the title.
title: title here
Slugs allow you to specify an appropriate URL section for the page. This should be all lowercase with underscores (_) instead of spaces.
Used to override the default template specified by the file name of the document. Valid templates are: chapter, article, gallery, reference, and imagemap.
Taxonomy is used to organize pages into collections or searches so the user can find what they are looking for quickly. We support three different taxonomies per page. They are:
The category is used for grouping articles into collections. See the documentation on content below. Each article in the same section should use the same category.
Tags are used to group subject matter of different articles into searchable groups. These can contain articles of varying categories and expertise.
This signifies the technical level needed to carry out the instructions in the article, if any. For example, editing style variables would require beginner level expertise. However, editing the CSS will require intermediate level expertise.
valid values for this are: 'beginner', 'intermediate', and 'expert'
The content variable allows collections to be made out of documents. This is primarly used on the