Micron Document
███╗ ██╗███╗ ██╗ ██████╗███╗ ███╗███████╗ ███████╗████████╗ █████╗ ██████╗ ████████╗███████╗██████╗
████╗ ██║████╗ ██║ ██╔════╝████╗ ████║██╔════╝ ██╔════╝╚══██╔══╝██╔══██╗██╔══██╗╚══██╔══╝██╔════╝██╔══██╗
██╔██╗ ██║██╔██╗ ██║ ██║ ██╔████╔██║███████╗ ███████╗ ██║ ███████║██████╔╝ ██║ █████╗ ██████╔╝
██║╚██╗██║██║╚██╗██║ ██║ ██║╚██╔╝██║╚════██║ ╚════██║ ██║ ██╔══██║██╔══██╗ ██║ ██╔══╝ ██╔══██╗
██║ ╚████║██║ ╚████║ ╚██████╗██║ ╚═╝ ██║███████║ ███████║ ██║ ██║ ██║██║ ██║ ██║ ███████╗██║ ██║
╚═╝ ╚═══╝╚═╝ ╚═══╝ ╚═════╝╚═╝ ╚═╝╚══════╝ ╚══════╝ ╚═╝ ╚═╝ ╚═╝╚═╝ ╚═╝ ╚═╝ ╚══════╝╚═╝ ╚═╝

Where the markdown-based content pages provide the page body, templates are used to control page layout.

When a page is rendered and shown to a visitor, three things happen:

1. Frontmatter from the content page is parsed
2. The Markdown body is converted into Micron content
3. The content is injected into the page template specified in the page frontmatter

This makes it easy to author content using Markdown and not think about fiddling with Micron to achieve a consistent layout across pages.

A template could look like this:

micron
{{header}}
>>
{{content}}
{{footer}}

This template containt three placeholders - {{header}}, {{content}}, and {{footer}}. Each of these are replaced by content when a page using the template is rendered. It is not currently possible to add new fragments (like header & footer) and use them without modifying the underlying code, but it is planned for a future release.


Built-in page templates

The project ships with a number of predefined page templates:

- default - general purpose layout for most content
- landing - for landing pages where you want a stronger first impression
- minimal - often used for utility pages where less chrome is better
- post - dated article pages, often blog posts, with comments

Here are examples of the current built-in page templates:

- Post

You can, of course, create custom page templates if you want to or if the built-in types don't work for you.

Page templates are located under /system/templates/pages.

Using page templates

Use template in page frontmatter to select the layout:

md
---
template: minimal
title: Compact Guide
slug: compact-guide
route: content/compact-guide.mu
summary: A compact page with low visual noise.
---

If template is omitted, the starter uses the default page template.

Here is an example of how a post template is used in frontmatter:

md
---
template: post
title: Example Post
slug: example-post
route: content/blogposts/example-post.mu
section: blog
date: 2026-03-29
summary: Short post summary.
comments: true
---

Fragments

A selection of other templates are also used:

- system/templates/fragments for shared site chrome like the node header and footer
- system/templates/apps for dynamic app output such as chat and search

Directive-specific output can also live in fragment subfolders, for example the comments templates under system/templates/fragments/comments.

App-specific copy or presentation settings can also live with the app itself, for example system/apps/search/config.py.




NomadNet CMS Starter - A reusable NomadNet site starter built from Markdown and Micron.

Page last updated 03/06/2026 13:36