Markdown Toolbox Logo Markdown Toolbox
Home
Blog

Common Front Matter for Markdown

2024-09-05

Short Version

When creating a markdown document, you can include front matter at the beginning. This can hold metadata about the document.

---
title: Document Title
date: YYYY-MM-DD
description: A brief description.
tags: [tag1, tag2]
author: Your Name
---

Long Version

Introduction

Front matter is a way to define metadata for a markdown document. This is typically enclosed within triple-dashed lines. Here's how you can structure it:

Structure of Front Matter

Your front matter can include various fields:

  • title: The title of your document
  • date: The publication date
  • description: A brief summary
  • tags: An array of relevant tags for the document
  • author: The author's name

Example

Here’s a comprehensive example:

---
title: The Great Markdown Guide
date: 2024-07-24
description: A complete guide on using markdown effectively.
tags: [Markdown, Guide, Formatting]
author: Ben Maddox
---

Using front matter can help in better organizing and managing your markdown documents, especially in static site generators.