Luna SSG Template Home Blog Archive GitHub

Mastering Layout: Sections, Categories, and Templates

Luna Core — 10 Feb 2026 | Posted in Documentation

Luna SSG is driven by metadata (Frontmatter). By changing a few lines at the top of your Markdown file, you can completely change how and where your content appears.

This guide covers the core logic of the engine as of v1.6.


1. Sections vs. Categories

In Luna SSG, these two fields serve different purposes:

section (Structural)

The section field determines which block on the Homepage your post will appear in.

category (Semantic)

The category field is used for grouping posts on the Archive page.


2. Templates

You can choose between two built-in layouts:

  1. template: post (Default):
    • Displays the date and location.
    • Shows the "Posted in..." metadata.
    • Appears in the chronological blog list.
  2. template: page:
    • Hides the date and metadata.
    • Used for static content like "About Me", "Contact", or "404".

3. Linklog (External Links)

Luna SSG supports "Daring Fireball" style link posts. If you add a link field, the post title on the homepage and archive will point directly to that URL.

title: "Check this cool site"
link: "https://example.com"

A small arrow () is automatically added to the title to indicate an external destination.


4. Intelligent URLs

By default, the engine creates a URL based on your title (e.g., Hello World -> hello-world.html). However, you can override this:


Example Frontmatter

Here is a complete example of a well-configured post:

---
title: "My New Project"
date: 2026-02-10
section: blog
category: Projects
location: "Ozersk, Russia"
slug: cool-project-2026
published: true
template: post
---

Happy blogging with Luna SSG!