Merodi
Merodi is a static site generator written in Go. You write pages in Markdown, use Jinja for includes, variables and macros, and extend the build with Lua plugins. The result is a folder of plain HTML files.
Merodi is pre-1.0 and under active development. Commands, configuration and template behavior may change. These docs describe version 0.5.2.
How it works
Every Markdown file in your source folder goes through the same steps:
src/md/page.md
|
| Jinja includes, variables, loops, macros
| Markdown converted to HTML
v
build/draft/page.html
Lua plugins can hook into every step. Files that are not Markdown, such as CSS and images, are copied as they are.
A page
This is a complete page:
{% document title="Hello" %}
{% style "static/style.css" %}
# Hello
Written in **Markdown**.
It builds to:
<!DOCTYPE html>
<html lang="en">
<head>
<title>Hello</title>
<link rel="stylesheet" href="static/style.css">
</head>
<body>
<h1>Hello</h1>
<p>Written in <strong>Markdown</strong>.</p>
</body>
</html>
Without the {% document %} tag, Merodi writes only the converted HTML and no <html> wrapper. That is useful for fragments.
What you get
- Markdown pages compiled to HTML
- Jinja templates that run before Markdown, so you can include, loop and use macros inside a page
- Tags for the document head:
document,meta,style,script - Lua plugins to enable Markdown extensions, set template variables, run code at each build step and add your own commands
- Draft and release builds with separate output folders
- A
watchcommand that runs your hooks when files change - One binary and one
config.toml
Where to go next
- Install Merodi, then follow the quick start
- Learn the project layout and config.toml
- Write content: pages and templates
- Extend it with plugins and hooks
- Look things up in the command line and Lua API references
- Copy a solution from the cookbook
Source code: github.com/pixel2175/merodi