Continue when a markdown file can't be found

Without the continue, we build the previous page in it's place

Fixes #327
This commit is contained in:
Dougal Matthews
2015-03-27 23:08:28 +00:00
parent 4f0ab8af25
commit 832ce37176

View File

@@ -157,10 +157,13 @@ def build_pages(config, dump_json=False):
for page in site_navigation.walk_pages():
# Read the input file
input_path = os.path.join(config['docs_dir'], page.input_path)
try:
input_content = open(input_path, 'r').read()
except IOError:
log.error('file not found: %s' % input_path)
continue
if PY2:
input_content = input_content.decode('utf-8')