From 832ce371763623908ec96d7aa9db571a4eda822a Mon Sep 17 00:00:00 2001 From: Dougal Matthews Date: Fri, 27 Mar 2015 23:08:28 +0000 Subject: [PATCH] Continue when a markdown file can't be found Without the continue, we build the previous page in it's place Fixes #327 --- mkdocs/build.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/mkdocs/build.py b/mkdocs/build.py index 11246feb..5efc0c35 100644 --- a/mkdocs/build.py +++ b/mkdocs/build.py @@ -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')