PPB - Pandoc Page Builder
PPB is a simple static site generator that converts Markdown files into HTML pages using a Pandoc template. It is designed for small websites where each page is written in Markdown and rendered through a single HTML template.
The PPB script can be downloaded and viewed here.
Features
- Converts all
.mdfiles in the current directory to.html - Uses a standard Pandoc template
- Generates standalone HTML pages
- Simple, dependency-light workflow
- No configuration files required
Requirements
- Bash
- Pandoc
Debian / Ubuntu
sudo apt install pandocArch Linux
sudo pacman -S pandocUsage
Place your Markdown files and template in the same directory:
about.md
contact.md
index.md
template.html
Run:
ppbPPB will generate:
about.html
contact.html
index.html
Template
PPB uses a standard Pandoc template.
At minimum, your template should contain the $body$ variable:
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>$title$</title>
</head>
<body>
$body$
</body>
</html>The $body$ variable is replaced by the HTML generated from the Markdown file.
Page Metadata
Pandoc metadata can be supplied at the top of a Markdown file.
Template variables such as $title$ can then be used inside template.html.
Example
about.md
# About
Welcome to my website.
- Simple
- Fast
- Statictemplate.html
<!doctype html>
<html>
<head>
<title>$title$</title>
</head>
<body>
$body$
</body>
</html>Output
Running:
ppbcreates about.html containing the rendered page wrapped in the template.
License
Public domain.