On This Page
Markdown Renderer
What it does: Converts .md files to HTML using Markdown syntax
File types: .md
Events: RENDER (priority 100)
How it works:
- Reads frontmatter between
---markers - Converts Markdown content to HTML using CommonMark
- Applies your chosen Twig template
- 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:
- Frontmatter is extracted and available to templates
- Markdown is converted to semantic HTML
- The title becomes
{{ title }}in your template - Content is wrapped in your chosen template
- File saved as
output/blog-post.html
No configuration needed - just create .md files and go!
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.