diff --git a/bin/lesson_check.py b/bin/lesson_check.py index 7bc09a3..311687e 100755 --- a/bin/lesson_check.py +++ b/bin/lesson_check.py @@ -155,6 +155,10 @@ def check_config(reporter, source_dir): reporter.check_field(config_file, 'configuration', config, 'title') reporter.check_field(config_file, 'configuration', config, 'email') + reporter.check({'values': {'root': '..'}} in config.get('defaults', []), + 'configuration', + '"root" not set to ".." in configuration') + def read_all_markdown(source_dir, parser): """Read source files, returning @@ -424,6 +428,12 @@ class CheckIndex(CheckBase): super(CheckIndex, self).__init__(args, filename, metadata, metadata_len, text, lines, doc) self.layout = 'lesson' + def check_metadata(self): + super(CheckIndex, self).check_metadata() + self.reporter.check(self.metadata.get('root', '') == '.', + self.filename, + 'Root not set to "."') + class CheckEpisode(CheckBase): """Check an episode page."""