=> Rocket Nine Labs

How to create a gemlog with gssg

gssg is a Gemini static site generator. It reads files from a source directory,

applies templating, generates an Atom feed and copies rendered files to a

destination directory.

=> gssg

=> Atom on Wikipedia

Download Go

gssg is written in the Go programming language. To download and install gssg,

the Go compiler must first be installed.

=> Download the Go compiler

Compile gssg

Execute the following command to download and build gssg from source:

go get sr.ht/~gsthnz/gssg

Once built, gssg is available at ~/go/bin/gssg.

Initialize the site

Execute the following command to initialize a new site:

gssg --init domain.com

This creates the following files and directories:

example.com
    config.toml
    content
        index.gmi
    templates
        atom.xml
        index.gmi
        page.gmi

Configure site details

Set your site's title, URL and other options by editing the file config.toml.

# Mandatory options
title = "Rocket Nine Labs"
url = "rocketnine.space"
source_dir = "content"
dest_dir = "public"

# Optional
template_dir = "templates" # Directory for the templates
feed_title = "Rocket Nine Labs gemlog" # Atom Feed name
feed_path = "posts/" # Directory on source_dir to search for articles for the feed

Customize page templates

All areas of the site are customizable by editing the files in the templates

directory. Simple layout and text changes do not require learning the template

syntax. To make more complex changes, see the Go template documentation.

=> Go template documentation

Create a post

Create a directory named posts. In posts, create a new .gmi file named in this format:

2020-11-24-create-gemlog-with-gssg.gmi

Posts should start with the date they are published. This date is referenced at

the bottom of each post and in the generated Atom feed.

Generate the site

Execute the following command in the directory containing config.toml to

generate the site:

gssg                              

The generated site is saved to a directory named public.

Once you've made your first post, announce your gemlog on the Gemini mailing list.

=> Gemini mailing list

Also, submit your site URL and Atom feed URL to GUS.

=> GUS (Gemini Universal Search)

If you need a Gemini server to host your site, check out twins.

=> twins Gemini server

How to create a gemlog with gssg was published on 2020-11-24

Proxy Information
Original URL
gemini://rocketnine.space/posts/2020-11-24-create-gemlog-with-gssg.gmi
Status Code
Success (20)
Meta
text/gemini; charset=utf-8; lang=en; size=2806
Capsule Response Time
133.698671 milliseconds
Gemini-to-HTML Time
0.677144 milliseconds

This content has been proxied by September (3851b).