⏱ 2 min read

Markdown Renderer

What it does: Converts .md files to HTML using Markdown syntax

File types: .md

Events: RENDER (priority 100)

How it works:

  1. Reads frontmatter between --- markers
  2. Converts Markdown content to HTML using CommonMark
  3. Applies your chosen Twig template
  4. Outputs the final HTML file

Example

Example input file (content/blog-post.md):

---
title: "My First Blog Post"
description: "An introduction to my blog"
---

# Welcome to My Blog

This is my **first post** using StaticForge!

## What I'll Write About

- Web development
- PHP tutorials
- Static site generation

Pretty *exciting*, right?

What you get:

No configuration needed by default - just create .md files and go!

Raw HTML in Markdown

By default, raw HTML written inside a .md file is passed through to the output unchanged - this has always been the behavior. If you want raw HTML escaped instead (for example, because your content comes from a source you don't fully trust), opt in via siteconfig.yaml:

markdown:
  trust_html: false

Review your existing content/ for raw HTML before flipping this - escaping is applied site-wide.

Draft Content

You can mark a file as a draft to exclude it from the build (unless SHOW_DRAFTS=true is set in .env).

---
title: "Work In Progress"
draft: true
---

This is useful for working on content that isn't ready to be published yet.


← Back to Features Overview