Skip to content

Commit

Permalink
Warn about not changing the demo site's URL
Browse files Browse the repository at this point in the history
  • Loading branch information
da2x committed Sep 2, 2015
1 parent 73c136a commit 7e94836
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions nikola/plugins/command/check.py
Expand Up @@ -236,6 +236,8 @@ def analyze(self, fname, find_sources=False, check_remote=False):
continue
target, _ = urldefrag(target)



# absolute URL to root-relative
if target.startswith(base_url.geturl()):
target = target.replace(base_url.geturl(), '/')
Expand Down Expand Up @@ -344,6 +346,10 @@ def scan_links(self, find_sources=False, check_remote=False):
failure = False
# Maybe we should just examine all HTML files
output_folder = self.site.config['OUTPUT_FOLDER']

if urlparse(self.site.config['BASE_URL']).netloc == 'example.com':
self.logger.error("You've not changed the SITE_URL (or BASE_URL) setting from \"example.com\"!")

for fname in _call_nikola_list(self.site)[0]:
if fname.startswith(output_folder):
if '.html' == fname[-5:]:
Expand Down

0 comments on commit 7e94836

Please sign in to comment.