Fields
Text
Single line text input. Displayed for Front Matter values that are short strings. For example, a page title.
---
title: "My New Page Title!"
---
Textarea
Multi-line text input. Displayed for Front Matter values that are long strings. For example, a page description.
---
description: "Write an awesome description for your new site here. It will appear in your document head meta (for Google search results) and in your RSS feed's site description."
---
Number
A stepped number input. Displayed for Front Matter values that are integers. For example, page weight.
---
weight: 1
number: 3.14
---
Toggle
True or false toggle. Displayed for Front Matter values that are booleans. For example, a feature toggle.
---
show_feature: true
---
Select
Multiple options displayed in a dropdown. Can be used for Front Matter values that are strings, but should be restricted to a set of options. Options can be sourced from existing content, data files, or manually provided. For example, a page’s author.
---
author: "scott-gallant"
---
Datetime
Date and time picker. Used for Front Matter values that are valid date strings. Can be restricted to only date or time values. For example, page created date or page publish date.
---
date: 2020-06-08T12:00:00+00:00
publish_date: 2020-06-10T12:00:00+00:00
---
Color Picker
A color picker. Useful for Front Matter values that are used to render color. Can be saved as RGB or hex value.
Tags Field
A list of options displayed as tags. Used for Front Matter values that are an array of strings. For example, page tags.
---
tags:
- hugo
- jekyll
- static-site-generators
---
Sortable List Field
A list of options displayed in a list. Used for Front Matter values that are an array of strings. Can be configured to restrict options in a dropdown. For example, page authors or related pages.
---
authors:
- "scott-gallant"
- "jordan-patterson"
---
File Upload
File upload input that adds uploads to the Media Library. Used for Front Matter values that are a string ending with a file extension. For example, a featured image.
---
banner: "/uploads/2017/12/31/banner_image.jpg"
extra_style: "/css/extra_styles.css"
extra_script: "/js/extra_script.js"
---
Multi-File Upload
Gallery of media files. Used for Front Matter values that are an array of strings ending with a file extension. For example, an image carousel.
---
carousel:
- "/uploads/2019/12/31/mountains.jpg"
- "/uploads/2019/12/31/field.jpg"
- "/uploads/2019/12/31/cabin.jpg"
extra_styles:
- "/css/extra_styles.css"
extra_scripts:
- "/js/extra_script.js"
---
Field Group
Group of Front Matter Fields. Used for Front Matter values that are an object. For example, your site’s footer information.
---
footer:
copyright: "© 2020 Acme Inc."
privacy_policy: "/privacy.md"
terms_of_service: "/terms.md"
---
Repeatable Field Group
List of Field Groups. Used for Front Matter values that are an array of like-objects. For example, a list of authors.
---
authors:
- name: Scott Gallant
bio: CEO & Co-founder
identifier: scott-gallant
- name: Jordan Patterson
bio: CTO & Co-founder
identifier: jordan-patterson
---
Include Template
Include the fields of another Front Matter Template into the current one. Good for commonly-reused front matter fields like SEO information.
Blocks
A Blocks field is similar to a Repeatable Field Group, except that it supports unlike objects. Blocks fields are great for things like dynamic page layouts: a series of sections where each section may consist of different fields.
Blocks fields work by including other front matter templates. You specify which templates can be used in your blocks field when creating the Front Matter Template. When adding content to a Blocks field, you can select which of these templates to add from a dropdown.
+++
[[blocks]]
background_style = "Brand Color"
heading = "Features"
size = "Small"
template = "hero-section"
[[blocks]]
background_style = "Light"
content = "[Bulma](https://bulma.io/) is a modern, responsive CSS framework with a flexbox-based grid system. "
heading = "Built With Bulma"
image = "/uploads/2018/04/19/bulma-logo.png"
image_position = "Left"
template = "media-feature"
+++
Caught a mistake or want to contribute to the docs? Edit this page on Github!