Skip to content

Introduction to Metadata

Jackson Couse edited this page Jul 23, 2013 · 25 revisions

What is YAML?

Rather than writing directly in HTML, you can write article and blog submissions in two simpler languages: YAML, which stands for “YAML Ain’t Markup Language,” and Markdown (more on Markdown in the next tutorial).

YAML is a basic set of plain-text formatting conventions that are converted to metadata on the Amnesty International website. Metadata provides your content with contextual information, makes it searchable (hello SEO!), and makes it simpler to sort for both the human beings who make websites and the robots who display websites online.

YAML also provides places to create "chunks" of information: small, reusable pieces of text. YAML controls how your content will appear in many different contexts: from the mobile website viewed on an iPhone, to a search result on Google, to a snippet on Facebook.

In short, YAML is a way to talk directly to the machines.

The YAML header

The following is a simplified example of a YAML header:

---
categories: blog
published: true
title: "Child Slavery in Uganda on the Rise"
layout: blog
topics: "child-poverty, slavery"
"meta-title": "Amnesty International report shows child slavery in Uganda is rising"
"meta-description": Amnesty International report shows child slavery in Uganda is rising despite concerted efforts by human rights groups to urge the government of Uganda to take action. Our Uganda observer, Clarence Thomas, reports from Kampala.
"seo-keywords": "human rights, Uganda, slavery, poverty, mining, children"
---

Everything between the --- lines is YAML-formatted metadata. Everything below the lines is the body of your text - the subject of the next tutorial.


Next

Introduction to Markdown