kiln/README.md

66 lines
1.4 KiB
Markdown
Raw Normal View History

2019-05-18 18:00:12 +00:00
# kiln
2020-09-22 20:42:14 +00:00
A simple static site generator for Gemini.
2019-05-18 18:00:12 +00:00
## Features
2020-09-22 20:42:14 +00:00
- Zero configuration
2019-05-18 18:00:12 +00:00
- Simple and fast
2020-09-22 20:42:14 +00:00
- Gemini support
- Go templates
2019-05-18 18:00:12 +00:00
## Installation
```
go install
```
2019-05-18 18:00:12 +00:00
## Usage
```
kiln
```
2020-09-22 20:42:14 +00:00
## Directory Structure
A kiln site is organized in the following way:
```
2020-09-23 01:11:56 +00:00
src/ Site source
templates/ Templates
page.gmi Page template
directory.gmi Directory template
dst/ Site destination
2020-09-22 20:42:14 +00:00
```
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)
2020-09-23 01:11:56 +00:00
## Directories
2020-09-22 20:42:14 +00:00
2020-09-23 01:11:56 +00:00
Directory templates are provided with the following information:
2020-09-22 20:42:14 +00:00
2020-09-23 01:11:56 +00:00
- `Path`: Relative path to the directory
- `Permalink`: Permalink to the directory
- `Pages`: The pages in this directory
- `Directories`: The subdirectories of this directory
2020-09-22 20:42:14 +00:00
## Templates
Templates are located in the `templates` directory.
There are currently two supported templates:
- `page.gmi`: The template used for pages
2020-09-23 01:11:56 +00:00
- `directory.gmi`: The template used for directories