Authoring Content

Front matter markers, the common keys every template supports, and worked examples of both file types.

Two file types, one front matter system

boxlang-ssg reads both .md and .bxm files. Each file may include YAML front matter to control metadata and output behavior. The marker syntax differs by file type:

TypeFront matter markers
MarkdownStart and end with ---
BoxLang markupStart with <!--- and end with --->

Common front matter keys

KeyMeaning
titlePage title
descriptionShort description
typeContent type (e.g. page, post) — used for view fallback and collections
layoutLayout file in _includes/layouts without extension (defaults to main)
viewView/partial in _includes/ without extension; falls back to type
slugOverride file slug (used for posts)
tagsArray of tags; builds collections.tags and collections.byTag
dateDate the content refers to
permalinkOverride output path, e.g. /tag/{{tag}}.html
fileExtOverride output extension, e.g. xml
publishedBoolean to include/exclude from output
excludeFromCollectionsBoolean to skip the item from collections

Example page (index.bxm)

html — index.bxm<!---
type: page
layout: main
--->
<bx:output>
<bx:loop array="#collections.post#" item="post">
  <a href="#post.permalink#">#post.title#</a><br />
</bx:loop>
</bx:output>

Example post (posts/example.md)

markdown — posts/example.md---
layout: main
type: post
slug: my-first-post
title: My First Post
description: A short summary
tags:
- misc
published: true
---

# Hello
This is my first post.