Skip to content

Commit c001ec8

Browse files
authored
Merge pull request #279 from rgaiacs/lesson-check
Fix lesson_check.py
2 parents 4a85f2c + f8f4cff commit c001ec8

1 file changed

Lines changed: 8 additions & 3 deletions

File tree

bin/lesson_check.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -175,9 +175,14 @@ def check_config(reporter, source_dir):
175175
reporter.check_field(config_file, 'configuration', config, 'title')
176176
reporter.check_field(config_file, 'configuration', config, 'email')
177177

178-
reporter.check({'values': {'root': '..'}} in config.get('defaults', []),
178+
for defaults in [
179+
{'values': {'root': '.', 'layout': 'page'}},
180+
{'values': {'root': '..', 'layout': 'episode'}, 'scope': {'type': 'episodes', 'path': ''}},
181+
{'values': {'root': '..', 'layout': 'page'}, 'scope': {'type': 'extras', 'path': ''}}
182+
]:
183+
reporter.check(defaults in config.get('defaults', []),
179184
'configuration',
180-
'"root" not set to ".." in configuration')
185+
'"root" not set to "." in configuration')
181186

182187

183188
def read_references(reporter, ref_path):
@@ -508,7 +513,6 @@ class CheckGeneric(CheckBase):
508513

509514
def __init__(self, args, filename, metadata, metadata_len, text, lines, doc):
510515
super().__init__(args, filename, metadata, metadata_len, text, lines, doc)
511-
self.layout = 'page'
512516

513517

514518
CHECKERS = [
@@ -517,6 +521,7 @@ def __init__(self, args, filename, metadata, metadata_len, text, lines, doc):
517521
(re.compile(r'index\.md'), CheckIndex),
518522
(re.compile(r'reference\.md'), CheckReference),
519523
(re.compile(r'_episodes/.*\.md'), CheckEpisode),
524+
(re.compile(r'aio\.md'), CheckNonJekyll),
520525
(re.compile(r'.*\.md'), CheckGeneric)
521526
]
522527

0 commit comments

Comments
 (0)