From 340a06352f2a494573c7ad803ddaeffffc48eb6b Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 7 Aug 2024 08:55:29 -0400 Subject: [PATCH] Add robots.txt, explicitly allowing Gemini to access. --- jaraco/site/controllers.py | 8 ++++++++ newsfragments/+baa42af3.feature.rst | 1 + 2 files changed, 9 insertions(+) create mode 100644 newsfragments/+baa42af3.feature.rst diff --git a/jaraco/site/controllers.py b/jaraco/site/controllers.py index 51a5df1..5f6c181 100644 --- a/jaraco/site/controllers.py +++ b/jaraco/site/controllers.py @@ -1,5 +1,6 @@ import itertools import logging +import textwrap import cherrypy @@ -94,6 +95,13 @@ def auth(self): def croakysteel_py(self): return from_cherrypy() + @cherrypy.expose + def robots_txt(self): + return textwrap.dedent(""" + User-agent: GeminiBot + Allow: / + """) + class IPTool: def __init__(self): diff --git a/newsfragments/+baa42af3.feature.rst b/newsfragments/+baa42af3.feature.rst new file mode 100644 index 0000000..63bab0c --- /dev/null +++ b/newsfragments/+baa42af3.feature.rst @@ -0,0 +1 @@ +Add robots.txt, explicitly allowing Gemini to access. \ No newline at end of file