Markdown (Content)


3 ~'s is the minimum for designating and separating a YAML block, but they can be extended longer -- all that matters is that the tildes (~) are on their own line.

And anything beyond that gets interpreted as Markdown!

You can even use template tags in here, for any variables you set in in the top YAML block, or in your site.yaml file:

This post's title is: "Markdown"

This file was last modified on 10/29/2015

Note that variables beginning with an underscore designate implicit metadata added by SiteGen.

Some vars that are always available by default:

`title`: post title, automatically set to name of markdown file if left blank

`_site`: site.yaml values

`_date`: post 'last modified' date

`_content`: post content (only accessible from templates, not markdown)

You can see all the vars you can use if you start SiteGen with --loglevel debug.

And as you can see, you can also use mustache logic to iterate through yaml maps and lists:





Note how you need to use a . to access a list item, but can access map/dict keys directly.

You can of course disable these markdown templating features by setting markdown_templating: true in your site.yaml file. Same ideas apply when writing your actual HTML templates. See mustache's docs for more templating info.