Skip to content

Commit e7d4ffa

Browse files
committed
Fix #2600 change robots.txt to allow a few pages
1 parent 9d0d82c commit e7d4ffa

File tree

1 file changed

+15
-2
lines changed

1 file changed

+15
-2
lines changed

scholia/app/views.py

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,21 @@
3232
from ..config import config
3333

3434

35+
ROBOTS_TXT = """User-agent: *
36+
Allow: /$
37+
Allow: /about
38+
Allow: /faq
39+
Allow: /author/$
40+
Allow: /organization/$
41+
Allow: /publisher/$
42+
Allow: /series/$
43+
Allow: /topic/$
44+
Allow: /venue/$
45+
Allow: /work/$
46+
Disallow: /
47+
"""
48+
49+
3550
class RegexConverter(BaseConverter):
3651
"""Converter for regular expression routes.
3752
@@ -2788,8 +2803,6 @@ def show_robots_txt():
27882803
Disallow: /
27892804
27902805
"""
2791-
ROBOTS_TXT = ('User-agent: *\n'
2792-
'Disallow: /\n')
27932806
return Response(ROBOTS_TXT, mimetype="text/plain")
27942807

27952808

0 commit comments

Comments
 (0)