Commit a4ab6560 authored by Greg Wilson's avatar Greg Wilson
Browse files

Merging changes from other branches

parents d5f879ab d62084b6
Loading
Loading
Loading
Loading
+10 −6
Original line number Diff line number Diff line
@@ -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 :
+3 −0
Original line number Diff line number Diff line
{% 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>
+3 −0
Original line number Diff line number Diff line
{% comment %}
  Display key points for an episode.
{% endcomment %}
<blockquote class="keypoints">
  <h2>Key Points</h2>
  <ul>
+5 −20
Original line number Diff line number Diff line
{% 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 %}
+3 −0
Original line number Diff line number Diff line
{% 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>
Loading