Tips and tricks for Yestercities

Using colors on your capsule

Using ANSI colors with terminal emulation is easy to do on Yestercities!

just put {{COLOR}} in front of the text you want to color

List of valid colors:

Adding a guestbook to your site

Just put {{GUESTBOOK}} wherever you want to display your messages.

to have people submit messages, add a link that points to gemini://cities.yesterweb.org/guestbook/USERNAME where "USERNAME" is your username

Using javascript in your gemtext

Only enabled for certain users. Contact us if you want access to this feature!

Toggle javascript on and off using ;;

# Hello world!
two plus two equals
;;
var a = 2;
var b = 2;
echo(a+b);
;;

Functions you may use:

e.g.

;;
let response = input("Do you wish to do it?");
if (response == "yes") {
    redirect("/some/path/");
} else {
    echo("you did not do it");
}
;;