Merging changes from other branches
authorGreg Wilson <gvwilson@third-bit.com>
Tue, 10 Jan 2017 00:59:11 +0000 (19:59 -0500)
committerGreg Wilson <gvwilson@third-bit.com>
Tue, 10 Jan 2017 00:59:11 +0000 (19:59 -0500)
Makefile
_includes/carpentries.html
_includes/episode_keypoints.html
_includes/episode_navbar.html
_includes/javascript.html
_includes/lesson_footer.html
_includes/main_title.html
_includes/navbar.html
_includes/workshop_ad.html
_includes/workshop_footer.html

index 0f395a310aeb0d795abed5ef50a77ee745337236..457de1ee85a2dc08129560ead9296d973d03be66 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -9,6 +9,7 @@ DST=_site
 
 # Controls
 .PHONY : commands clean files
+.NOTPARALLEL:
 all : commands
 
 ## commands         : show all commands.
@@ -16,11 +17,11 @@ commands :
        @grep -h -E '^##' ${MAKEFILES} | sed -e 's/## //g'
 
 ## serve            : run a local server.
-serve : lesson-rmd
+serve : lesson-md
        ${JEKYLL} serve
 
 ## site             : build files but do not run a server.
-site : lesson-rmd
+site : lesson-md
        ${JEKYLL} build
 
 # repo-check        : check repository settings.
@@ -53,7 +54,7 @@ workshop-check :
 ## ----------------------------------------
 ## Commands specific to lesson websites.
 
-.PHONY : lesson-check lesson-rmd lesson-files lesson-fixme
+.PHONY : lesson-check lesson-md lesson-files lesson-fixme
 
 # RMarkdown files
 RMD_SRC = $(wildcard _episodes_rmd/??-*.Rmd)
@@ -79,9 +80,12 @@ HTML_DST = \
   $(patsubst _extras/%.md,${DST}/%/index.html,$(wildcard _extras/*.md)) \
   ${DST}/license/index.html
 
-## lesson-rmd       : convert Rmarkdown files to markdown
-lesson-rmd: $(RMD_SRC)
-       @bin/knit_lessons.sh $(RMD_SRC)
+## lesson-md        : convert Rmarkdown files to markdown
+lesson-md : ${RMD_DST}
+
+# Use of .NOTPARALLEL makes rule execute only once
+${RMD_DST} : ${RMD_SRC}
+       @bin/knit_lessons.sh ${RMD_SRC}
 
 ## lesson-check     : validate lesson Markdown.
 lesson-check :
index 1742b23d201b3d24193b8897d750664cfc7a3a98..a0e0181fc7bf984d7b95a9c0b70e1230d6e350a4 100644 (file)
@@ -1,3 +1,6 @@
+{% comment %}
+  General description of Software and Data Carpentry.
+{% endcomment %}
 <div class="row">
   <div class="col-md-2" align="center">
     <a href="{{ site.swc_site }}"><img src="{{ page.root }}/assets/img/swc-icon-blue.svg" alt="Software Carpentry logo" /></a>
index 85378a568bca3cc554ee32a2e324e17f9382461b..2baa53ef0c4f4be23a0d291e60c44341f816be81 100644 (file)
@@ -1,3 +1,6 @@
+{% comment %}
+  Display key points for an episode.
+{% endcomment %}
 <blockquote class="keypoints">
   <h2>Key Points</h2>
   <ul>
index a789d3d9908eca4b6a61a1588259b26006c35982..1f6e033dc7825788fc159e3c5f085da20f61bef3 100644 (file)
@@ -1,26 +1,11 @@
 {% comment %}
-  Find previous and next episodes (if any).
-{% endcomment %}
-{% for episode in site.episodes  %}
-  {% if episode.url == page.url %}
-    {% unless forloop.first %}
-      {% assign prev_episode = prev %}
-    {% endunless %}
-    {% unless forloop.last %}
-      {% assign next_episode = site.episodes[forloop.index] %}
-    {% endunless %}
-  {% endif %}
-  {% assign prev = episode %}
-{% endfor %}
-
-{% comment %}
-  Display title and prev/next links.
+  Navigation bar for an episode.
 {% endcomment %}
 <div class="row">
   <div class="col-md-1">
     <h3>
-      {% if prev_episode %}
-      <a href="{{ page.root }}{{ prev_episode.url }}"><span class="glyphicon glyphicon-menu-left" aria-hidden="true"></span><span class="sr-only">previous episode</span></a>
+      {% if page.previous.url %}
+      <a href="{{ page.root }}{{ page.previous.url }}"><span class="glyphicon glyphicon-menu-left" aria-hidden="true"></span><span class="sr-only">previous episode</span></a>
       {% else %}
       <a href="{{ page.root }}/"><span class="glyphicon glyphicon-menu-up" aria-hidden="true"></span><span class="sr-only">lesson home</span></a>
       {% endif %}
@@ -34,8 +19,8 @@
   </div>
   <div class="col-md-1">
     <h3>
-      {% if next_episode %}
-      <a href="{{ page.root }}{{ next_episode.url }}"><span class="glyphicon glyphicon-menu-right" aria-hidden="true"></span><span class="sr-only">next episode</span></a>
+      {% if page.next.url %}
+      <a href="{{ page.root }}{{ page.next.url }}"><span class="glyphicon glyphicon-menu-right" aria-hidden="true"></span><span class="sr-only">next episode</span></a>
       {% else %}
       <a href="{{ page.root }}/"><span class="glyphicon glyphicon-menu-up" aria-hidden="true"></span><span class="sr-only">lesson home</span></a>
       {% endif %}
index 010ae4af13d0e3b8c1c10e36d5a91527e3e51bf0..a2066c202809b465acc364e63211461f435bbc8f 100644 (file)
@@ -1,3 +1,6 @@
+{% comment %}
+  Javascript used in lesson and workshop pages.
+{% endcomment %}
 <script src="{{ page.root }}/assets/js/jquery.min.js"></script>
 <script src="{{ page.root }}/assets/js/bootstrap.min.js"></script>
 <script src="{{ page.root }}/assets/js/lesson.js"></script>
index a37ba3eceb1bcf6b3a31fa05210219cd8bdb0366..be46c2d46d59e182b9c99d8aedfa2a4e989ccb3d 100644 (file)
@@ -1,3 +1,6 @@
+{% comment %}
+  Footer for lesson pages.
+{% endcomment %}
 <footer>
   <div class="row">
     <div class="col-md-6" align="left">
index 60b8b06937c72e5125f392ba34c7327db92de906..8e22ced110926139022b54a201d66a46c34d491d 100644 (file)
@@ -1 +1,4 @@
+{% comment %}
+  Main title for lesson pages.
+{% endcomment %}
 <h1 class="maintitle"><a href="{{ page.root }}/">{{ site.title }}</a>{% if page.title %}: {{ page.title }}{% endif %}</h1>
index 6a4df8a7c83d81f5fdec28ebf07f7511af3cd2d2..effea29dbd061db10d1b68d47a3a4ca82e45f4a9 100644 (file)
@@ -1,3 +1,6 @@
+{% comment %}
+  Lesson navigation bar.
+{% endcomment %}
 <nav class="navbar navbar-default">
   <div class="container-fluid">
     <div class="navbar-header">
index bffe9b9e25a088782f65e92408d5d26867b67cd8..e8e72e34db7bdb3f44955e76c7c13ec1fddbfdc1 100644 (file)
@@ -1,3 +1,6 @@
+{% comment %}
+  Advertising box at the top of a workshop website home page.
+{% endcomment %}
 <div class="jumbotron">
   <div class="row">
     <div class="col-md-10 col-md-offset-1">
index 71a227ac8a1232ddba9a93bd6a2f6f54a5d7ef71..3ae63e6dc8f48dd341532e0fd95582e72e50c6e5 100644 (file)
@@ -1,3 +1,6 @@
+{% comment %}
+  Footer for a standard workshop.
+{% endcomment %}
 <footer>
   <div class="row">
     <div class="col-md-4" align="left">