Frontmatter

Overview

Frontmatter is the TOML block at the top of an .mq page. It lets you override site-wide defaults for things like theme, layout, content width, content column alignment, and page metadata.

There are two places where you can define configuration settings in a Marque project:

marque.toml at the project's root for site-wide defaults.

Frontmatter at the top of each .mq page for per-page overrides.

Defaults Configuration (marque.toml)

The marque.toml file is where you define your configuration settings that apply to the entire site. This is where you define key parameters such as:

toml
title = Marque
description = Built with Marque
repo = https://github.com/Loxed/marque
layout = sidebar
theme = rustique
width = 82
align = center
summary = false

These settings apply to the entire site.

Here's what each parameter does:

Key Description
title title of your site, used as main icon in the navbar and in page titles.
description metadata description for your site, used in the <head> of your pages.
repo optional Git repository URL shown in the footer.
layout navigation layout for your pages (topnav/sidebar).
theme theme for your pages (e.g., comte, rustique, or legacy/mida).
width content width for your pages, can be a percentage (82, 50%) or predefined: narrow (70%), normal (82%), wide (92%), full (100%).
align content alignment for your pages (left, center, or right).
summary page summary rail setting for your pages (true or false).

Per-page Overrides (Inline Frontmatter)

Pages can override site-wide defaults by including frontmatter at the top of the .mq file:

mq
+++               <--- opening TOML frontmatter fence
title = Layouts      <--- override page title
layout = topnav      <--- override page layout
theme = legacy/mida  <--- override page theme
width = 50%          <--- override page width
align = right        <--- place the content column on the right
summary = true       <--- enable the page summary rail
nav = new-link       <--- override output slug
+++               <--- closing fence
# Layout          <--- page content starts here
@divider
  rest of content...

These settings override default settings and apply only to the page they are defined in.

Every parameter defined in a page's frontmatter is optional. A page can work without any frontmatter, in which case it will simply inherit all settings from marque.toml. Missing or invalid parameters in the frontmatter will fall back to the defaults defined in marque.toml.