Skip to content

Commit

Permalink
Don’t check in outut to see if robots exsit (Issue #2098)
Browse files Browse the repository at this point in the history
  • Loading branch information
da2x committed Sep 17, 2015
1 parent 6d0e313 commit dac0a62
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 4 deletions.
11 changes: 11 additions & 0 deletions CHANGES.txt
@@ -1,3 +1,14 @@
New in Master
=============

Features
--------

Bugfixes
--------

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

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

Expand Down
2 changes: 1 addition & 1 deletion nikola/plugins/task/robots.py
Expand Up @@ -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,
Expand Down
7 changes: 4 additions & 3 deletions nikola/utils.py
Expand Up @@ -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
Expand Down

0 comments on commit dac0a62

Please sign in to comment.