A simple static site generator
Go to file
2020-09-22 21:15:03 -04:00
go.mod Reimplement in Go 2020-09-22 16:42:14 -04:00
kiln.go Trim newlines after page title 2020-09-22 21:15:03 -04:00
LICENSE Add LICENSE 2020-09-22 00:02:36 -04:00
main.go Remove titles and dates from pages 2020-09-22 21:11:56 -04:00
README.md Remove titles and dates from pages 2020-09-22 21:11:56 -04:00

kiln

A simple static site generator for Gemini.

Features

  • Zero configuration
  • Simple and fast
  • Gemini support
  • Go templates

Installation

go install

Usage

kiln

Directory Structure

A kiln site is organized in the following way:

src/               Site source
templates/         Templates
    page.gmi       Page template
    directory.gmi  Directory template
dst/               Site destination

Running kiln takes the contents in src, runs them through the templates in templates, and outputs the result to dst.

Pages

Page templates are provided with the following information:

  • Title: The title parsed from the first heading in the file
  • Date: The date parsed from the filename (e.g. 2020-09-22-hello-world.gmi)
  • Path: Relative path to the page
  • Permalink: Permalink to the page
  • Content: The contents of the file (including the title)

Directories

Directory templates are provided with the following information:

  • Path: Relative path to the directory
  • Permalink: Permalink to the directory
  • Pages: The pages in this directory
  • Directories: The subdirectories of this directory

Templates

Templates are located in the templates directory.

There are currently two supported templates:

  • page.gmi: The template used for pages
  • directory.gmi: The template used for directories