Skip to content
Browse files
and this makes check -l work
  • Loading branch information
ralsina committed May 27, 2015
1 parent 63e1c5e commit c85eddb642abe509a93d3e2bcc74b9551dbce9d1
Showing with 7 additions and 10 deletions.
  1. +7 −10 nikola/plugins/command/
@@ -164,7 +164,7 @@ def _execute(self, options, args):
existing_targets = set([])
checked_remote_targets = {}

def analyze(self, task, find_sources=False, check_remote=False):
def analyze(self, fname, find_sources=False, check_remote=False):
rv = False
self.whitelist = [re.compile(x) for x in['LINK_CHECK_WHITELIST']]
base_url = urlparse(['BASE_URL'])
@@ -178,7 +178,7 @@ def analyze(self, task, find_sources=False, check_remote=False):
if url_type in ('absolute', 'full_path'):
url_netloc_to_root = urlparse(['BASE_URL']).path
filename = task.split(":")[-1]
filename = fname

if filename.startswith(['CACHE_FOLDER']):
# Do not look at links in the cache, which are not parsed by
@@ -262,14 +262,11 @@ def scan_links(self, find_sources=False, check_remote=False):"===============\n")
self.logger.notice("{0} mode".format(['URL_TYPE']))
failure = False
for task in _call_nikola_list(
task = task.strip()
if task.split(':')[0] in (
'render_tags', 'render_archive',
'render_galleries', 'render_indexes',
'render_pages', 'render_posts',
'render_site') and '.html' in task:
if self.analyze(task, find_sources, check_remote):
# Maybe we should just examine all HTML files
output_folder =['OUTPUT_FOLDER']
for fname in _call_nikola_list(
if output_folder in fname and '.html' in fname:
if self.analyze(fname, find_sources, check_remote):
failure = True
if not failure:"All links checked.")

0 comments on commit c85eddb

Please sign in to comment.