shizuka
shizuka  /  docs

Authoring Content

Authoring content with frontmatter

Shizuka stores structured page metadata in markdown (or optionally HTML) frontmatter. A frontmatter block must be the very first thing in the file, with no leading whitespace. Shizuka will consume the following formats:

FormatSyntax
YAMLFence with ---.
TOMLFence with +++.
JSON/JSONCPut a JSON object at the very start of the file, with no fence. Comments are allowed.

If present, the fence line must be the very first line of the file, with no leading whitespace and no content before it.

An example JSON frontmatter block:

{
  // Comments are allowed in object frontmatter.
  "title": "Hello",
  "description": "A short post.",
  "template": "post",
  "section": "posts",
  "slug": "hello",
  "weight": 10,
  "tags": ["intro", "shizuka"],
  "featured": true,
  "draft": false,
  "rss": { "include": true },
  "sitemap": { "include": true, "changefreq": "monthly", "priority": 0.7 },
  "robots": { "disallow": false }
}

Markdown content here.

Structured Pages

Non-Markup content files are parsed like the frontmatter, as a single object and must include:

KeyMeaning
templateThe template name to render.
bodyA string containing HTML to inject as .Page.Body.
body_markdownOptional boolean. When true, body is rendered as Markdown before it is injected as .Page.Body.

For example:

title = "About"
template = "page"
weight = 20

[sitemap]
include = true

body = """
This is an **about** page.
"""

Fields

Identifiers

KeyType
titlestring
descriptionstring
sectionstring, becomes .Page.Section
slugoptional identifier. Explicit slugs must contain only letters, numbers, _, and -; missing slugs are generated for the build.
tagslist of strings
weightinteger ordering hint; lower values sort earlier
created, updatedtimestamps
featuredboolean
draftboolean
paramsarbitrary map merged into .Page.Params
templatestring, required for rendering unless a default supplies it

Extra fields

KeyType
headersmap of per-page headers for the headers build step
rssinclude, title, description, guid
sitemapinclude, changefreq, priority
robotsdisallow