💾 Archived View for 7-ph.com › articles › gssg-readme.gmi captured on 2022-07-16 at 13:36:39. Gemini links have been rewritten to link to archived content

View Raw

More Information

⬅️ Previous capture (2022-04-28)

-=-=-=-=-=-=-

gssg

A gemini static site generator

gssg will:

Usage

Initialize a new site with gssg -init:

gssg -init example.com

This will create the following structure:

example.com
├── config.toml
├── content
│   └── index.gmi
└── templates
    ├── atom.xml
    ├── index.gmi
    └── page.gmi

The default template expects posts on the content/posts folder, and it will display them on the index.gmi page ordered by date.

At this point, you have a working gssg installation. To generate the site, just run:

gssg

Dates

Dates will be populated on the page information via the filename or the contents of the file.

If the filename has a YYYY-MM-DD string, that will be counted as date, if not, gssg will search in the file contents for the first entry of YYYY-MM-DD and use that as date.

Configuration

Configuration will be made through the config.toml file in the root of the site.

Available configuration options:

## Mandatory options
title = "anon's gemlog" # Title of the gemlog
url = "example.com" # URL of the gemlog
source_dir = "content" # Directory of the source files
dest_dir = "public" # Directory of the generated files

# Optional
template_dir = "templates" # Directory for the templates
feed_title = "posts anon's gemlog" # Atom Feed name
feed_path = "posts/" # Directory on source_dir to search for articles for the feed

Templates

There's three available templates at the moment, page.gmi, index.gmi and atom.xml

Page template variables

Index template variables

Atom feed variables

Building

make
make install