Skip to content

Commit a4ab656

Browse files
committed
Merging changes from other branches
2 parents d5f879a + d62084b commit a4ab656

10 files changed

+39
-26
lines changed

Makefile

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,18 +9,19 @@ DST=_site
99

1010
# Controls
1111
.PHONY : commands clean files
12+
.NOTPARALLEL:
1213
all : commands
1314

1415
## commands : show all commands.
1516
commands :
1617
@grep -h -E '^##' ${MAKEFILES} | sed -e 's/## //g'
1718

1819
## serve : run a local server.
19-
serve : lesson-rmd
20+
serve : lesson-md
2021
${JEKYLL} serve
2122

2223
## site : build files but do not run a server.
23-
site : lesson-rmd
24+
site : lesson-md
2425
${JEKYLL} build
2526

2627
# repo-check : check repository settings.
@@ -53,7 +54,7 @@ workshop-check :
5354
## ----------------------------------------
5455
## Commands specific to lesson websites.
5556

56-
.PHONY : lesson-check lesson-rmd lesson-files lesson-fixme
57+
.PHONY : lesson-check lesson-md lesson-files lesson-fixme
5758

5859
# RMarkdown files
5960
RMD_SRC = $(wildcard _episodes_rmd/??-*.Rmd)
@@ -79,9 +80,12 @@ HTML_DST = \
7980
$(patsubst _extras/%.md,${DST}/%/index.html,$(wildcard _extras/*.md)) \
8081
${DST}/license/index.html
8182

82-
## lesson-rmd : convert Rmarkdown files to markdown
83-
lesson-rmd: $(RMD_SRC)
84-
@bin/knit_lessons.sh $(RMD_SRC)
83+
## lesson-md : convert Rmarkdown files to markdown
84+
lesson-md : ${RMD_DST}
85+
86+
# Use of .NOTPARALLEL makes rule execute only once
87+
${RMD_DST} : ${RMD_SRC}
88+
@bin/knit_lessons.sh ${RMD_SRC}
8589

8690
## lesson-check : validate lesson Markdown.
8791
lesson-check :

_includes/carpentries.html

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
{% comment %}
2+
General description of Software and Data Carpentry.
3+
{% endcomment %}
14
<div class="row">
25
<div class="col-md-2" align="center">
36
<a href="{{ site.swc_site }}"><img src="{{ page.root }}/assets/img/swc-icon-blue.svg" alt="Software Carpentry logo" /></a>

_includes/episode_keypoints.html

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
{% comment %}
2+
Display key points for an episode.
3+
{% endcomment %}
14
<blockquote class="keypoints">
25
<h2>Key Points</h2>
36
<ul>

_includes/episode_navbar.html

Lines changed: 5 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,11 @@
11
{% comment %}
2-
Find previous and next episodes (if any).
3-
{% endcomment %}
4-
{% for episode in site.episodes %}
5-
{% if episode.url == page.url %}
6-
{% unless forloop.first %}
7-
{% assign prev_episode = prev %}
8-
{% endunless %}
9-
{% unless forloop.last %}
10-
{% assign next_episode = site.episodes[forloop.index] %}
11-
{% endunless %}
12-
{% endif %}
13-
{% assign prev = episode %}
14-
{% endfor %}
15-
16-
{% comment %}
17-
Display title and prev/next links.
2+
Navigation bar for an episode.
183
{% endcomment %}
194
<div class="row">
205
<div class="col-md-1">
216
<h3>
22-
{% if prev_episode %}
23-
<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>
7+
{% if page.previous.url %}
8+
<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>
249
{% else %}
2510
<a href="{{ page.root }}/"><span class="glyphicon glyphicon-menu-up" aria-hidden="true"></span><span class="sr-only">lesson home</span></a>
2611
{% endif %}
@@ -34,8 +19,8 @@ <h1 class="maintitle">{{ page.title }}</h1>
3419
</div>
3520
<div class="col-md-1">
3621
<h3>
37-
{% if next_episode %}
38-
<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>
22+
{% if page.next.url %}
23+
<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>
3924
{% else %}
4025
<a href="{{ page.root }}/"><span class="glyphicon glyphicon-menu-up" aria-hidden="true"></span><span class="sr-only">lesson home</span></a>
4126
{% endif %}

_includes/javascript.html

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
{% comment %}
2+
Javascript used in lesson and workshop pages.
3+
{% endcomment %}
14
<script src="{{ page.root }}/assets/js/jquery.min.js"></script>
25
<script src="{{ page.root }}/assets/js/bootstrap.min.js"></script>
36
<script src="{{ page.root }}/assets/js/lesson.js"></script>

_includes/lesson_footer.html

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
{% comment %}
2+
Footer for lesson pages.
3+
{% endcomment %}
14
<footer>
25
<div class="row">
36
<div class="col-md-6" align="left">

_includes/main_title.html

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,4 @@
1+
{% comment %}
2+
Main title for lesson pages.
3+
{% endcomment %}
14
<h1 class="maintitle"><a href="{{ page.root }}/">{{ site.title }}</a>{% if page.title %}: {{ page.title }}{% endif %}</h1>

_includes/navbar.html

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
{% comment %}
2+
Lesson navigation bar.
3+
{% endcomment %}
14
<nav class="navbar navbar-default">
25
<div class="container-fluid">
36
<div class="navbar-header">

_includes/workshop_ad.html

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
{% comment %}
2+
Advertising box at the top of a workshop website home page.
3+
{% endcomment %}
14
<div class="jumbotron">
25
<div class="row">
36
<div class="col-md-10 col-md-offset-1">

_includes/workshop_footer.html

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
{% comment %}
2+
Footer for a standard workshop.
3+
{% endcomment %}
14
<footer>
25
<div class="row">
36
<div class="col-md-4" align="left">

0 commit comments

Comments
 (0)