diff options
author | Bryan Newbold <bnewbold@archive.org> | 2021-04-29 16:13:27 -0700 |
---|---|---|
committer | Bryan Newbold <bnewbold@archive.org> | 2021-04-29 16:13:27 -0700 |
commit | f65f8ffb559826fa9d2ec5fd34d630735519b5dd (patch) | |
tree | cbb1a6d32a0c2b0a5720ad776f7b15e5cc3574ca /fatcat_scholar/web.py | |
parent | 6b1f87c12f7d40a3016910b214579a368c747df4 (diff) | |
download | fatcat-scholar-f65f8ffb559826fa9d2ec5fd34d630735519b5dd.tar.gz fatcat-scholar-f65f8ffb559826fa9d2ec5fd34d630735519b5dd.zip |
web: sitemap.xml serving
Diffstat (limited to 'fatcat_scholar/web.py')
-rw-r--r-- | fatcat_scholar/web.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/fatcat_scholar/web.py b/fatcat_scholar/web.py index adddcbd..9963cec 100644 --- a/fatcat_scholar/web.py +++ b/fatcat_scholar/web.py @@ -413,6 +413,12 @@ async def favicon() -> Any: "fatcat_scholar/static/ia-favicon.ico", media_type="image/x-icon" ) +@app.get("/sitemap.xml", include_in_schema=False) +async def basic_sitemap() -> Any: + return FileResponse( + "fatcat_scholar/static/sitemap.xml", media_type="application/xml" + ) + ROBOTS_ALLOW = open("fatcat_scholar/static/robots.allow.txt", "r").read() ROBOTS_DISALLOW = open("fatcat_scholar/static/robots.disallow.txt", "r").read() |