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

Where to go next

Source code: github.com/pixel2175/merodi