Mendoza

Overview

Mendoza is a static site generator. It is a thin wrapper around the Janet programming language for templaing HTML, writing Markup, and developing a static website. The template and markup languages are both Janet DSLs, or dialects, so can used ordinary Janet functions, macros, and modules.

With inspiration from Scribble, we are using a macro system which expands the entire document into a Janet data structure, and then calls eval on that data structure to genereate a document. That document is then rendered into HTML, with each node having an optional bar template. This design is flexible enough to let us dictate form from the markup (via janet functions and macros) and from the templates (templates can wrap nodes in HTML, and even call other janet functions to render markup in arbitrary ways. HTML, however, remains the sole intended output format.

Source Code

https://github.com/bakpakin/mendoza

Simple Example

It should be easy to get a basic site up and running in Mendoza, as there are no configuration files required and templates are provided out of the box.

Below is an equivalent of "Hello, World!" for mendoza. Put it in a file content/index.mdz and run mdz from the project directory to generate your site.

{:title "Hello, world!"
 :template "blueblog/main.html"
 :author "me@myself.net"}
---
# Hey there!

Welcome to my site!

Serving the Site

Once your site has been generated, the output artifacts will be in the site directory. You can then serve these with your favorite HTTP server, or run mdz serve to serve them on the local machine with circlet.