💾 Archived View for cities.yesterweb.org › tips.gmi captured on 2023-01-29 at 15:57:11. Gemini links have been rewritten to link to archived content

View Raw

More Information

⬅️ Previous capture (2022-04-28)

➡️ Next capture (2023-03-20)

-=-=-=-=-=-=-

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");
}
;;