Reverse sort date
Some further tweaks after using it.
Allow location of config file to be specified and improve documentation
This is a static site generator targeting Gemini. The expected directory layout for the site source files is like so:
.
├── cfg.toml
├── main.gmi
├── about.gmi
├── page.tpl
├── gemlog
│ ├── 2021-07-28-entry.gmi
│ ├── index.tpl
│ ├── page.tpl
│ └── atom.tpl
└── poetry
├── 2021-07-28-entry.gmi
├── index.tpl
├── page.tpl
└── atom.tpl
Each directory containing gemtext (.gmi) is expected to have a page.tpl file which uses Go templating.
The result of rendering the above directory looks like:
output
├── about.gmi
├── main.gmi
├── gemlog
│ ├── 2021-07-28-entry.gmi
│ ├── index.gmi
│ └── atom.xml
└── poetry
├── 2021-07-28-entry.gmi
├── index.gmi
└── atom.xml
Each page template has the following variables:
.Site
.Title
.Url
.Page
.Title
.Date
.Path
.Content
Each index or atom template has the following variables:
.Site
.Title
.Url
.Pages # Array
.Page
.Title
.Date
.Path
.Content
Currently there are only two options to set:
Example:
# cfg.toml
title = "My Website"
url = "gemini.test.org"
When running the executable, you can specify where the configuration file is:
static-gemini -c /path/to/my-config.toml in out
If not specified, it is assumed to be named cfg.toml
and reside at the root of in
.
TODO
go build
.$PATH
.