hugo/examples/blog/content/post/another-post.md
Anthony Fok efc98a3b1f Update example blog to Hugo v0.12 conventions
- Convert config.yaml to config.toml to follow what
  "hugo new site /path/to/site" generates
- Rename layouts/chrome to layouts/partials
- Convert "template" calls to "partial" calls
- Minor revisions to the text in example content
- Upgrade Bootswatch Yeti theme (3.1.1+1 → to 3.2.0+3)
- Upgrade Font Awesome (4.0.3 → 4.2.0)
- Upgrade jQuery (1.11.0 → 1.11.1)
2014-09-02 17:18:22 -04:00

1.3 KiB

+++ title = "Another Hugo Post" description = "Nothing special, but one post is boring." date = "2014-09-02" categories = [ "example", "configuration" ] tags = [ "example", "hugo", "toml" ] +++

TOML, YAML, JSON --- Oh my!

One of the nifty Hugo features we should cover: flexible configuration and front matter formats! This entry has front matter in toml, unlike the last one which used yaml, and json is also available if that's your preference.

The toml front matter used on this entry:

+++
title = "Another Hugo Post"
description = "Nothing special, but one post is boring."
date = "2014-09-02"
categories = [ "example", "configuration" ]
tags = [
    "example",
    "hugo",
    "toml"
]
+++

This flexibility also extends to your site's global configuration file. You're free to use any format you prefer::simply name the file config.yaml, config.toml or config.json, and go on your merry way.

JSON Example

How would this entry's front matter look in json? That's easy enough to demonstrate:

{
    "title": "Another Hugo Post",
    "description": "Nothing special, but one post is boring.",
    "date": "2014-09-02",
    "categories": [ "example", "configuration" ],
    "tags": [
        "example",
        "hugo",
        "toml"
    ],
}