Numbering the lessons in the schedule
authorRaniere Silva <raniere@rgaiacs.com>
Sat, 18 Feb 2017 17:14:20 +0000 (17:14 +0000)
committerRaniere Silva <raniere@rgaiacs.com>
Fri, 3 Mar 2017 21:05:51 +0000 (21:05 +0000)
Related with https://github.com/swcarpentry/styles/issues/80.

_includes/syllabus.html

index 118e58489e66ae6e7e0913723e8115cc5bb4ac1f..86b69c3eba45d88b25170ad27a763345145d7593 100644 (file)
@@ -5,6 +5,7 @@
 <div class="syllabus">
   <h2 id="schedule">Schedule</h2>
 
+  {% assign lesson_number = 0 %}
   {% assign day = 0 %}
   {% assign multiday = false %}
   {% for episode in site.episodes %}
@@ -40,7 +41,8 @@
       {% if multiday %}<td class="col-md-1">{% if episode.start %}Day {{ day }}{% endif %}</td>{% endif %}
       <td class="{% if multiday %}col-md-1{% else %}col-md-2{% endif %}">{% if hours < 10 %}0{% endif %}{{ hours }}:{% if minutes < 10 %}0{% endif %}{{ minutes }}</td>
       <td class="col-md-3">
-        <a href="{{ page.root }}{{ episode.url }}">{{ episode.title }}</a>
+        {% assign lesson_number = lesson_number | plus: 1 %}
+       {{ lesson_number }}. <a href="{{ page.root }}{{ episode.url }}">{{ episode.title }}</a>
       </td>
       <td class="col-md-7">
         {% if episode.break %}