mirror of
https://git.sr.ht/~adnano/kiln
synced 2024-10-30 01:13:08 +00:00
go.mod | ||
kiln.go | ||
LICENSE | ||
main.go | ||
README.md |
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 fileDate
: The date parsed from the filename (e.g.2020-09-22-hello-world.gmi
)Path
: Relative path to the pagePermalink
: Permalink to the pageContent
: The contents of the file (including the title)
Directories
Directory templates are provided with the following information:
Path
: Relative path to the directoryPermalink
: Permalink to the directoryPages
: The pages in this directoryDirectories
: 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 pagesdirectory.gmi
: The template used for directories