diff --git a/add_seo.py b/add_seo.py new file mode 100644 index 0000000..6888818 --- /dev/null +++ b/add_seo.py @@ -0,0 +1,42 @@ +import io + +p = "/Users/drjones/pest-nocturne/index.html" +s = open(p).read() + +NOSCRIPT = '''''' + +# inject the noscript right after +s = s.replace("", "\n" + NOSCRIPT, 1) + +open(p, "w").write(s) +print("noscript SEO block injected; size", len(s)) diff --git a/app.py b/app.py index 968670c..dbbd695 100644 --- a/app.py +++ b/app.py @@ -60,6 +60,30 @@ def index(): def images(filename): return send_from_directory(os.path.join(BASE_DIR, "images"), filename) +@app.route("/robots.txt") +def robots(): + body = ( + "User-agent: *\n" + "Allow: /\n" + "Sitemap: https://evergreenapplicator.thetempleofdoom.com/sitemap.xml\n" + ) + return body, 200, {"Content-Type": "text/plain; charset=utf-8"} + +@app.route("/sitemap.xml") +def sitemap(): + body = ( + '\n' + '\n' + ' \n' + ' https://evergreenapplicator.thetempleofdoom.com/\n' + ' 2026-09-01\n' + ' weekly\n' + ' 1.0\n' + ' \n' + '\n' + ) + return body, 200, {"Content-Type": "application/xml; charset=utf-8"} + @app.route("/api/status") def api_status(): oid = request.args.get("order", "") diff --git a/index.html b/index.html index 5c3e21b..33f06f3 100644 --- a/index.html +++ b/index.html @@ -375,6 +375,37 @@ mark{background:color-mix(in srgb,var(--brass) 30%,transparent); color:inherit;
+