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
gssg is written in the Go programming language. To download and install gssg,
the Go compiler must first be installed.
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.
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
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
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.
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.
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.
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.
How to create a gemlog with gssg was published on 2020-11-24
text/gemini; charset=utf-8; lang=en; size=2806
This content has been proxied by September (3851b).