Skip to content
Browse files
Handle as suggested in #1757 (untested)
  • Loading branch information
ralsina committed May 27, 2015
1 parent ee3e113 commit 972d67d44d80e48f549169d95cd9e76327031a1f
Showing with 4 additions and 1 deletion.
  1. +4 −1 nikola/plugins/command/auto/
@@ -211,7 +211,10 @@ def serve_static(self, environ, start_response):
if os.path.isdir(f_path):
f_path = os.path.join(f_path,['INDEX_FILE'])

if os.path.isfile(f_path):
if puri.path == '/robots.txt':
start_response(b'200 OK', [(b'Content-type', 'txt/plain')])
return '''User-Agent: *\nDisallow: /\n'''
elif os.path.isfile(f_path):
with open(f_path) as fd:
start_response(b'200 OK', [(b'Content-type', mimetype)])
return self.inject_js(mimetype,

0 comments on commit 972d67d

Please sign in to comment.