Websleydale is a Python 3 program that builds your website by compiling source files with Pandoc.



Clone this git repository and put the wb script on your PATH somehow. For example, if you have ~/bin in your PATH, you might do:

$ git clone <clone url> && cd websleydale
$ ln -s `pwd`/wb ~/bin/wb


  1. Author your website pages in Pandoc’s markdown format.

  2. Make an HTML template file for Pandoc. You can use Pandoc’s default HTML5 template as a starting point. See the Pandoc docs for more details.

  3. Write a script in the root dir of your project. See the sample below.

  4. Run wb (Websleydale build) from the root dir of your project.

    $ wb

    wb just executes the script with a little magic to make sure the websleydale Python package is on the Python path.

Sample file

This is the configuration I’m using for

from websleydale import build, copy, directory, menu, pandoc, set_defaults
from websleydale.sources import Dir, Git

local = Dir(".")
pages = Dir("pd")
htaccess = Dir("htaccess")
recipes = Git("")
rockuefort = Git("")
routemaster = Git("")
subjunctive = Git("")
think_green = Git("")
websleydale_ = Git("")

root = directory({
    ".htaccess": htaccess["root"],
    "files/.htaccess": htaccess["files"],
    "files/public/.htaccess": htaccess["files_public"],

    "css": local["css"],
    "font": local["font"],
    "image": local["image"],
    "media": local["media"],
    "favicon.ico": local["image/favicon.ico"],

    "robots.txt": pages["robots.txt"],
    "404.shtml": pandoc(pages["404.pd"]),
    "index.html": pandoc(pages["index.pd"]),
    "music.html": pandoc(pages["music.pd"]),
    "boxer.html": pandoc(pages["boxer.pd"]),
    "jabberwockus.html": pandoc(pages["jabberwockus.pd"]),
    "krypto.html": pandoc(pages["krypto.pd"], header=pages["krypto.header"]),
    "cafe": directory({
        "index.html": pandoc(pages["cafe/index.pd"]),
    "recipes": directory({
        "%s.html" % name: pandoc(recipes["%s.pd" % name]) for name in [
    "projects": directory({
        "rockuefort/index.html": pandoc(rockuefort[""]),
        "routemaster/index.html": pandoc(routemaster[""], toc=True),
        "subjunctive/index.html": pandoc(subjunctive[""]),
        "think-green/index.html": pandoc(think_green[""]),
        "websleydale/index.html": pandoc(websleydale_[""]),
    "wiki": directory({
        "%s.html" % name: pandoc(pages["wiki/%s.pd" % name]) for name in [

menu_ = menu([
    ("index", "/"),
    ("music", "/music.html"),
    ("projects", "/projects/"),
    ("recipes", "/recipes/"),
    ("wiki", "/wiki/"),
    ("café", "/cafe/"),


build("out", root)