Skip to content

Z506: MALFORMED_FRONTMATTER

Severity: error Penalty: 5.0 points Category: content Auto-fixable: No

Rationale

This rule is triggered when the opening YAML frontmatter delimiter on line 1 of a file is malformed (such as using -- instead of ---), causing metadata directives to be parsed as raw body text.

How to Fix

Inspect the flagged location in the Markdown file and update the content or configuration:

Bad (Triggers Z506)

<!-- BAD: Line 1 uses two dashes instead of three -->
--
title: "Invalid Frontmatter"
---

Good (Resolves Z506)

<!-- GOOD: Line 1 uses exactly three dashes -->
---
title: "Valid Frontmatter"
---

Configuration

# Evaluated on line 1 of Markdown files

Reference

See the Finding Codes Index for finding code details.