package finch

  1. Overview
  2. Docs
Simple and fast site generator

Install

Dune Dependency

Authors

Maintainers

Sources

0.1.tar.gz
md5=68ca8039be1f7ecbba42b00246733e33
sha512=619af6f76241c076da9b22b2e6c1c0d345dedef55b6f89bfd1f9b4e4789d8f525408a6d01884f8d4004de2130b384a69e2d466ac260b8bdc6f7149c9f82666a0

README.md.html

README.md

Finch

A simple and fast1 site generator.

Can be used as:

  • A generic static site generator using markdown files with frontmatter and Jingoo (very similar to Jinja) templates

  • A tiny version of Gatsby -- generate static pages from React components

  • A server side renderer to produce static pages with React components that are hydrated by scripts (see the examples directory)

Installation

With opam: opam pin add finch https://github.com/roddyyaga/finch.git

It is also available as a Docker container: docker run -v $(pwd):/finch roddylm/finch:latest -help

Use

Make a directory called layouts. Add template files to it with {{ page.content }} where the content of a page being rendered should go. Then make a directory called content. Add files to it that look like this:

---
layout: "path/to/a/template/relative/to/layouts"
other: "variables"
if: "you want"
---
The *content* of the page in [markdown](https://en.wikipedia.org/wiki/Markdown).

Then run finch. The output site will be in the directory site.

See here for detailed documentation.

1 From ad hoc comparisons, about twice as fast as Hugo to build simple sites with 10,000-100,000 pages, and successfully built a site with 500,000 pages where Hugo froze my machine.