new code:

#!/bin/sh
page="$(echo "$QUERY_STRING" | sed 's/page\?=//')"
style="https://unpkg.com/sakura.css/css/sakura-dark.css"
title="Aoi's Gemini Proxy - ${page}"
title_err="Aoi's Gemini Proxy - Error"

printf "%s %s\n\r" "Content-type: text/html"

if [ -z "$page" ]; then
        echo "<!DOCTYPE html><html><head><link rel=stylesheet href=$style><title>$title_err</title></head>"
        echo "<body><p>Usage: <code>$(basename $0)/page?=gemini://envs.net</code></p><p>Note: This proxy is half-baked on purpose</p>"
        echo "</body></html>"
else
        echo "<!DOCTYPE html><html><head><link rel=stylesheet href=$style><title>$title</title></head>"
        echo "<body>$(./gemget -o - ${page} | ./gmi2html)</body>"
        echo "<br><hr><footer><details><summary>Proxied by <a href=https://git.sr.ht/~novaburst/cgi-gemini-proxy>cgi-gemini-proxy</a></summary></details></footer></body></html>"
fi

#rxgapqa
This is twtxt search engine and crawler. Please contact Support if you have any questions, concerns or feedback!