Gemini Protocol & Markup

The Gemini project defines a protocol and markup for serving documents. The server runs on port 1965 by default, it responds to gemini:// URLs, it uses TLS with client certificates, and it has a simple markdown that fixes the shortcomings of Gopher pages without adding much extra. There are GUI, terminal, and command line clients already available.

If you want to publish stuff somewhere separate from the world wide web, then this seems like a good alternative. The markdown is simple, yet gives headings, paragraphs, pre-formatted blocks, lists, and links. Below is a summary, but the full specification is at https://gemini.circumlunar.space/docs/specification.html (it’s brief; it can currently be read in the time it takes to drink a coffee!)

# This would be an H1
## This would be an H2
### This would be an H3

=> https://www.susa.net Click me, I always exist on my own line.

> This line will show as a block-quote

* This is the first list item.
* This is another list item.

Pre-formatted blocks start and end with lines containing three back-ticks (```)

Anything else is just normal paragraph text, blank lines are always preserved.

This is a great initiative. Decisions seem to have been well considered. I’m grateful! For more, see https://gemini.circumlunar.space/

A gemini (.gmi) page viewed in the GemiNaut browser.

My server needs a private key and certificate (just issued locally using openssl).

# This command created a key and certificate that's valid for any host on susa.net.
openssl req -x509 -newkey rsa:4096 -keyout key.rsa -out cert.pem -days 3650 -nodes -subj "/CN=*.susa.net"

# This command lets you view your server's certificate as human-readable text for troubleshooting.
openssl x509 -in cert.pem -text

The following is some server output, including the command line that launched the server.

kevin@kakapo:~/gemini$ ./agate.x86_64-unknown-linux-gnu 0.0.0.0:1965 ./content/ cert.pem key.rsa
Got request for "gemini://www.susa.net:1965/"
Got request for "gemini://www.susa.net/"
Got request for "gemini://gemini.susa.net/"
Got request for "gemini://gmi.susa.net/"
Got request for "gemini://gmi.susa.net/favicon.txt"
Error: Os { code: 2, kind: NotFound, message: "No such file or directory" }
Got request for "gemini://gmi.susa.net:1965/"
Got request for "gemini://gmi.susa.net:1965/petz_functions"
Error: Os { code: 2, kind: NotFound, message: "No such file or directory" }
Got request for "gemini://gmi.susa.net:1965/petz_functions.gmi"

My index.gmi file to show a little markdown.

Hello from Gemini

=> petz_functions.gmi a list of member functions in the Petz mod.

You may check out my website at: -
=> https://www.susa.net/wordpress/

```
-- Lua code to log my name minetest.log("Kevin")
```
Kevin said:
> This is quite a useable format to document Minetest mods. I think I'll use this in future.

### I'm signing off now
Good day to you sir. I bid you farewell.

If you have a gemini client, you can view this at gemini://gmi.susa.net/

Leave a Reply

Your email address will not be published. Required fields are marked *