πŸ§™ Custom Front Matter

Custom metadata that has special powers in the common theme.

Front matter

Front matter is metadata that is added to the top of a markdown file. It is used to provide information about the content of the file. It’s common to all SSGs 🧢 🧢 SSGs Static Site Generators: SSG. Common theme is built with Hugo, a static site generator.

Hugo comes with a load of built-in front matter variables that you can use to customise your content.

These docs just cover settings custom to the Common Theme. For a full list of Hugo front matter variables, see the Hugo documentation.

Activities

activities = ["playing computer", "analogise"]

This is a Hugo taxonomy to create a shared pedagogic vocabulary. This is a list of teaching techniques or activities used in the block. It’s used to build the activity handbook, to help mentors and learners use effective teaching techniques during class

Backlog

backlog="Module-Name"
backlog_filter="Week 1"

Only active on the Backlog view. This will show a list of all the issues in the backlog repo for the module. You can filter by any label that exists in the backlog repo.

Blocks

[[blocks]]
name="Block name"
src="path/to/block"

See the blocks documentation for more information.

In front matter you can also nest blocks, like this:

[[blocks]]
name="Block name"
src="path/to/block"
  [[blocks.nested.blocks]]
  name="Nested block name"
  src="path/to/nested/block"

You might want to do this to provide a list of options on a reusable block like a “do a workshop” block, where you can choose from a list of workshops to run.

Emoji

emoji = "🎽"

This is the emoji that will show up in the menu and on the page. It’s a nice touch to help people quickly identify what they’re looking at. We use emojis all the time on our Slack and it’s part of our culture.

Map

A map is an ordered slice of menus. It’s to show a “map” view of the syllabus, broken down into grouped modules. As with everything in this design, the point is to clarify what happens and in what order.

It’s just for the index page, and the front matter is a list of the menu names that should be included in the map, in the order they should appear.

map = ["menuName", "menuName"]

We mostly use Hugo menus. Assign your modules to menus to group them by theme or purpose.

Any section assigned to syllabus will show in the main slideout menu. This is currently hardcoded to syllabus but it’s simple to change this to a variable set in hugo.toml and we probably will at some point. You can assign a section to multiple menus.

menu = ["syllabus", "layouts"]

Hugo doesn’t like repeated names in Menus, but we want all our modules and sprints to have consistent, repeated (predictable) names. So we use the menu_level parameter in the front matter to assign directories to a menu level based on where it is nested.

menu_level = "module"

Values: module, sprint, product

graph LR subgraph syllabus subgraph module sprint product end end

Objectives

Learning Objectives

objectives = ["objective1", "objective2"]

This is a list of learning objectives for a block. They will show up in the success view for any sprint this block is added to, and on the block itself when rendered on to a page.

Learning objectives are really important for organising and focusing the learning time of our community.

Overview: theme, hide_from_overview

Overview

theme="Asynchronous programming"

On prep pages, this is used to build an overview page. It’s a list of themes that will be included in the overview. We might change this to a Hugo taxonomy at some point.

hide_from_overview=true

On blocks. Any block assigned to a theme will be included in the overview, unless it is marked hide_from_overview=true.

Time

time = 60

This is the time in minutes that a block will take. It’s used in the day plan to build a schedule, and in the prep view to help learners schedule their learning. Time is very important to our learners, as many people are fitting learning around other commitments, including multiple jobs, childcare, and other responsibilities. If we are asking someone to do an activity, we must be clear about how long it will take, so they can find that time.