2013-07-08 22:23:54 -04:00
|
|
|
+++
|
|
|
|
title = "Front Matter"
|
|
|
|
date = "2013-07-01"
|
|
|
|
+++
|
2013-07-04 11:32:55 -04:00
|
|
|
|
|
|
|
The front matter is one of the features that gives Hugo it's strength. It enables
|
2013-08-09 16:35:23 -04:00
|
|
|
you to include the meta data of the content right with it. Hugo supports a few
|
|
|
|
different formats each with their own identifying tokens.
|
2013-07-08 22:23:54 -04:00
|
|
|
|
|
|
|
Supported formats: <br>
|
|
|
|
**YAML**, identified by '\-\-\-'. <br>
|
|
|
|
**TOML**, indentified with '+++'.<br>
|
|
|
|
**JSON**, a single JSON object which is surrounded by '{' and '}' each on their own line.
|
|
|
|
|
|
|
|
### YAML Example
|
2013-07-06 22:31:43 -04:00
|
|
|
|
|
|
|
---
|
2013-07-08 22:23:54 -04:00
|
|
|
title: "spf13-vim 3.0 release and new website"
|
|
|
|
description: "spf13-vim is a cross platform distribution of vim plugins and resources for Vim."
|
|
|
|
tags: [ ".vimrc", "plugins", "spf13-vim", "vim" ]
|
|
|
|
pubdate: "2012-04-06"
|
|
|
|
categories:
|
2013-07-06 22:31:43 -04:00
|
|
|
- "Development"
|
|
|
|
- "VIM"
|
2013-07-08 22:23:54 -04:00
|
|
|
slug: "spf13-vim-3-0-release-and-new-website"
|
2013-07-08 17:57:01 -04:00
|
|
|
---
|
2013-08-09 16:35:23 -04:00
|
|
|
Content of the file goes Here
|
2013-07-08 22:23:54 -04:00
|
|
|
|
|
|
|
### TOML Example
|
|
|
|
|
|
|
|
+++
|
|
|
|
title = "spf13-vim 3.0 release and new website"
|
|
|
|
description = "spf13-vim is a cross platform distribution of vim plugins and resources for Vim."
|
|
|
|
tags = [ ".vimrc", "plugins", "spf13-vim", "vim" ]
|
|
|
|
Pubdate = "2012-04-06"
|
|
|
|
categories = [
|
|
|
|
"Development",
|
|
|
|
"VIM"
|
|
|
|
]
|
|
|
|
slug = "spf13-vim-3-0-release-and-new-website"
|
|
|
|
+++
|
2013-08-09 16:35:23 -04:00
|
|
|
Content of the file goes Here
|
2013-07-08 22:23:54 -04:00
|
|
|
|
|
|
|
### JSON Example
|
|
|
|
|
|
|
|
{
|
|
|
|
"title": "spf13-vim 3.0 release and new website",
|
|
|
|
"description": "spf13-vim is a cross platform distribution of vim plugins and resources for Vim.",
|
|
|
|
"tags": [ ".vimrc", "plugins", "spf13-vim", "vim" ],
|
|
|
|
"date": "2012-04-06",
|
|
|
|
"categories": [
|
|
|
|
"Development",
|
|
|
|
"VIM"
|
|
|
|
],
|
|
|
|
"slug": "spf13-vim-3-0-release-and-new-website",
|
|
|
|
}
|
2013-08-09 16:35:23 -04:00
|
|
|
Content of the file goes Here
|
2013-07-04 11:32:55 -04:00
|
|
|
|
|
|
|
### Variables
|
2013-07-06 22:31:43 -04:00
|
|
|
|
2013-07-04 11:32:55 -04:00
|
|
|
There are a few predefined variables that Hugo is aware of and utilizes. The user can also create
|
|
|
|
any variable they want to. These will be placed into the `.Params` variable available to the templates.
|
2013-07-08 22:23:54 -04:00
|
|
|
**Field names are case insensitive.**
|
2013-07-04 11:32:55 -04:00
|
|
|
|
|
|
|
#### Required
|
|
|
|
|
2013-07-08 22:23:54 -04:00
|
|
|
**title** The title for the content. <br>
|
|
|
|
**description** The description for the content.<br>
|
|
|
|
**date** The date the content will be sorted by.<br>
|
|
|
|
**indexes** These will use the field name of the plural form of the index (see tags and categories above)
|
2013-07-04 11:32:55 -04:00
|
|
|
|
|
|
|
#### Optional
|
|
|
|
|
2013-08-09 16:35:23 -04:00
|
|
|
**redirect** Mark the post as a redirect post<br>
|
2013-07-08 22:23:54 -04:00
|
|
|
**draft** If true the content will not be rendered unless `hugo` is called with -d<br>
|
|
|
|
**type** The type of the content (will be derived from the directory automatically if unset).<br>
|
|
|
|
**markup** (Experimental) Specify "rst" for reStructuredText (requires
|
2013-07-06 22:31:43 -04:00
|
|
|
`rst2html`,) or "md" (default) for the Markdown.<br>
|
2013-07-08 22:23:54 -04:00
|
|
|
**slug** The token to appear in the tail of the url.<br>
|
2013-07-04 11:32:55 -04:00
|
|
|
*or*<br>
|
2013-07-08 22:23:54 -04:00
|
|
|
**url** The full path to the content from the web root.<br>
|
2013-07-04 11:32:55 -04:00
|
|
|
*If neither is present the filename will be used.*
|
|
|
|
|