~cafe

Welcome to tilde.cafe!

gemini

the gemini protocol (http proxy) was created in 2019.

gemini is a new internet protocol which:


the ~/public_gemini directory is not created by default. use mkdir ~/public_gemini to create it, then you can start adding index.gmi etc, it will be served at gemini://tilde.cafe/~username/ and gemini://username.tilde.cafe.

for more information about how you write gemtext, check out the Introduction to Gemtext Markup, there is also a cheatsheet.

to browse gemini content, you will need a client or a web proxy.

clients

CGI

make sure you set the correct shebang and make the file executable.

then, print the status and type per the gemini spec: here's a simple example in sh

#!/bin/sh
printf "20 text/gemini\r\n"
echo "hello world"

note that the first line must send \r\n

if you want to debug your script, you can redirect your stderr into a file, if you use shell scripts, you'd do it like this:

#!/bin/sh
exec 2>/tmp/my_gemini_debug.txt
printf "20 text/gemini\r\n"
echo "hello world"

keep in mind that all cgi scripts run under a single user ("gemini"), so it might not have permission to run scripts, or write files, that you can

also be careful about what the scripts can write, because there's nothing preventing someone else from overwriting your files, with their scripts!

feel free to drop by #gemini on tilde.chat irc if you have questions.