diff --git a/_includes/all_keypoints.html b/_includes/all_keypoints.html index 2656acc7bba354eac2d6498fd29f36d7e6df8f3e..bedfd7375e4b14c932b402f5615afc4aae43dc00 100644 --- a/_includes/all_keypoints.html +++ b/_includes/all_keypoints.html @@ -7,7 +7,7 @@ {% unless episode.break %} <tr> <td class="col-md-3"> - <a href="{{ site.root }}/{{ episode.url }}">{{ episode.title }}</a> + <a href="{{ site.root }}{{ episode.url }}">{{ episode.title }}</a> </td> <td class="col-md-9"> <ul> diff --git a/_includes/episode_title.html b/_includes/episode_title.html index e6fbb8c30e6cca05256e363aced5d9e806b67740..297abde7de04000020ab343da217b27bea354609 100644 --- a/_includes/episode_title.html +++ b/_includes/episode_title.html @@ -14,13 +14,13 @@ {% endfor %} <div class="row"> <div class="col-md-1"> - <h3>{% if prev_episode %}<a href="{{ site.root }}/{{ prev_episode.url }}"><span class="glyphicon glyphicon-menu-left"></span></a>{% endif %}</h3> + <h3>{% if prev_episode %}<a href="{{ site.root }}{{ prev_episode.url }}"><span class="glyphicon glyphicon-menu-left"></span></a>{% endif %}</h3> </div> <div class="col-md-10"> <h3 class="maintitle"><a href="{{ site.root }}/">{{ site.title }}</a></h3> <h1 class="maintitle">{{ page.title }}</h1> </div> <div class="col-md-1"> - <h3>{% if next_episode %}<a href="{{ site.root }}/{{ next_episode.url }}"><span class="glyphicon glyphicon-menu-right"></span></a>{% endif %}</h3> + <h3>{% if next_episode %}<a href="{{ site.root }}{{ next_episode.url }}"><span class="glyphicon glyphicon-menu-right"></span></a>{% endif %}</h3> </div> </div> diff --git a/_includes/syllabus.html b/_includes/syllabus.html index 0240d85b126206a1cbcb4d1a6bd8316ac06c978b..5f4b7c8586ffd5669823fff401b597aa1e0845ec 100644 --- a/_includes/syllabus.html +++ b/_includes/syllabus.html @@ -34,7 +34,7 @@ {% if multiday %}<td class="col-md-1">{% if episode.start %}Day {{ day }}{% endif %}</td>{% endif %} <td class="col-md-1">{% if hours < 10 %}0{% endif %}{{ hours }}:{% if minutes < 10 %}0{% endif %}{{ minutes }}</td> <td class="col-md-3"> - <a href="{{ site.root }}/{{ episode.url }}">{{ episode.title }}</a> + <a href="{{ site.root }}{{ episode.url }}">{{ episode.title }}</a> </td> <td class="col-md-7"> {% if episode.break %} diff --git a/assets/css/lesson.scss b/assets/css/lesson.scss index 2f933b8045ccf5fbfe1aa94f095dd505e2a4b5cc..604245e3775d32c0e5703dbaa712c04113fb65df 100644 --- a/assets/css/lesson.scss +++ b/assets/css/lesson.scss @@ -71,7 +71,7 @@ $codeblock-padding: 5px !default; .callout{ @include bkSetup(#31708f, "\e146"); } .challenge{ @include bkSetup(#3c763d, "\270f"); } -.getready{ @include bkSetup(#D4C30B, "\e067"); } +.checklist{ @include bkSetup(#D4C30B, "\e067"); } .keypoints{ @include bkSetup(#0B80F0, "\e101"); } .objectives{ @include bkSetup(#D4C30B, "\e124"); } .prereq{ @include bkSetup(#D4C30B, "\e240"); } diff --git a/bin/validator b/bin/validator index c173905a2fcbd7ce644fee71f7358ee717aef92d..2c5ad24abe4fcbc8b3291bd13edf3bd2f6922f66 100755 --- a/bin/validator +++ b/bin/validator @@ -15,8 +15,8 @@ from bs4 import BeautifulSoup from lxml import etree -# Default configuration. -DEFAULT_CONFIG = '''\ +# Default lesson configuration. +LESSON_CONFIG = '''\ patterns: '*.html': - has_title_in_head @@ -66,6 +66,11 @@ def parse_args(): default=None, dest='config_file', help='configuration file') + parser.add_option('-l', '--lesson', + default=False, + action='store_true', + dest='check_lesson', + help='check a lesson') parser.add_option('-s', '--source', default='_site', dest='source_dir', @@ -75,10 +80,16 @@ def parse_args(): action='count', dest='verbose', help='report actions') + parser.add_option('-w', '--workshop', + default=False, + action='store_true', + dest='check_workshop', + help='check a workshop') args, extras = parser.parse_args() _require(not extras, 'Unexpected trailing command-line arguments "{0}"'.format(extras)) + _require(args.check_lesson != args.check_workshop, 'Must have exactly one of -l/-w') return args @@ -91,8 +102,10 @@ def read_config(args): if args.config_file: with open(args.config_file, 'r') as reader: args.config = yaml.load(reader) + elif args.check_lesson: + args.config = yaml.load(LESSON_CONFIG) else: - args.config = yaml.load(DEFAULT_CONFIG) + assert False, 'Do not know what configuration to load' args.patterns = args.config['patterns']