Skip to content

Commit 4df5052

Browse files
authored
Don't check links.md in lessons that use remote theme
Fixes carpentries/styles#570
1 parent 4b3d44a commit 4df5052

1 file changed

Lines changed: 10 additions & 2 deletions

File tree

bin/lesson_check.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,10 @@ def main():
113113
if life_cycle == "pre-alpha":
114114
args.permissive = True
115115
check_source_rmd(args.reporter, args.source_dir, args.parser)
116-
args.references = read_references(args.reporter, args.reference_path)
116+
117+
args.references = {}
118+
if not using_remote_theme():
119+
args.references = read_references(args.reporter, args.reference_path)
117120

118121
docs = read_all_markdown(args.source_dir, args.parser)
119122
check_fileset(args.source_dir, args.reporter, list(docs.keys()))
@@ -167,6 +170,10 @@ def parse_args():
167170

168171
return args
169172

173+
def using_remote_theme():
174+
config_file = os.path.join(source_dir, '_config.yml')
175+
config = load_yaml(config_file)
176+
return 'remote_theme' in config
170177

171178
def check_config(reporter, source_dir):
172179
"""Check configuration file."""
@@ -493,7 +500,8 @@ def check(self):
493500
"""Run extra tests."""
494501

495502
super().check()
496-
self.check_reference_inclusion()
503+
if not using_remote_theme():
504+
self.check_reference_inclusion()
497505

498506
def check_metadata(self):
499507
super().check_metadata()

0 commit comments

Comments
 (0)