Skip to content
Permalink
Browse files

Don’t check in outut to see if robots exsit (Issue #2098)

  • Loading branch information
da2x committed Sep 17, 2015
1 parent 6d0e313 commit dac0a626ed2ad6b375517428dc0a4d80df6951e9
Showing with 16 additions and 4 deletions.
  1. +11 −0 CHANGES.txt
  2. +1 −1 nikola/plugins/task/robots.py
  3. +4 −3 nikola/utils.py
@@ -1,3 +1,14 @@
New in Master
=============

Features
--------

Bugfixes
--------

* /robots.txt was never being built (Issue #2098)

New in v7.7.1
=============

@@ -71,7 +71,7 @@ def write_robots():

yield self.group_task()

if not utils.get_asset_path("robots.txt", [], files_folders=kw["files_folders"]):
if not utils.get_asset_path("robots.txt", [], files_folders=kw["files_folders"], output_dir=False):
yield utils.apply_filters({
"basename": self.name,
"name": robots_path,
@@ -1002,9 +1002,10 @@ def get_asset_path(path, themes, files_folders={'files': ''}, _themes_dir='theme
if os.path.isfile(candidate):
return candidate

candidate = os.path.join(output_dir, path)
if os.path.isfile(candidate):
return candidate
if output_dir:
candidate = os.path.join(output_dir, path)
if os.path.isfile(candidate):
return candidate

# whatever!
return None

0 comments on commit dac0a62

Please sign in to comment.
You can’t perform that action at this time.