Unverified Commit 1ec43fb3 authored by François Michonneau's avatar François Michonneau
Browse files

update template

parents 8d4ba24b 1f3c60f7
root = true
[*]
charset = utf-8
insert_final_newline = true
trim_trailing_whitespace = true
[*.md]
indent_size = 2
indent_style = space
max_line_length = 100 # Please keep this in sync with bin/lesson_check.py!
[*.r]
max_line_length = 80
[*.py]
indent_size = 4
indent_style = space
max_line_length = 79
[*.sh]
end_of_line = lf
[Makefile]
indent_style = tab
...@@ -43,7 +43,7 @@ clean : ...@@ -43,7 +43,7 @@ clean :
@find . -name '*.pyc' -exec rm {} \; @find . -name '*.pyc' -exec rm {} \;
## clean-rmd : clean intermediate R files (that need to be committed to the repo). ## clean-rmd : clean intermediate R files (that need to be committed to the repo).
clear-rmd : clean-rmd :
@rm -rf ${RMD_DST} @rm -rf ${RMD_DST}
@rm -rf fig/rmd-* @rm -rf fig/rmd-*
...@@ -88,9 +88,8 @@ HTML_DST = \ ...@@ -88,9 +88,8 @@ HTML_DST = \
## lesson-md : convert Rmarkdown files to markdown ## lesson-md : convert Rmarkdown files to markdown
lesson-md : ${RMD_DST} lesson-md : ${RMD_DST}
# Use of .NOTPARALLEL makes rule execute only once _episodes/%.md: _episodes_rmd/%.Rmd
${RMD_DST} : ${RMD_SRC} @bin/knit_lessons.sh $< $@
@bin/knit_lessons.sh ${RMD_SRC}
## lesson-check : validate lesson Markdown. ## lesson-check : validate lesson Markdown.
lesson-check : lesson-fixme lesson-check : lesson-fixme
......
{% comment %} {% comment %}
Display key points of all episodes for reference. Display key points of all episodes for reference.
{% endcomment %} {% endcomment %}
{% include base_path.html %}
<h2>Key Points</h2> <h2>Key Points</h2>
<table class="table table-striped"> <table class="table table-striped">
{% for episode in site.episodes %} {% for episode in site.episodes %}
{% unless episode.break %} {% unless episode.break %}
<tr> <tr>
<td class="col-md-3"> <td class="col-md-3">
<a href="{{ page.root }}{{ episode.url }}">{{ episode.title }}</a> <a href="{{ relative_root_path }}{{ episode.url }}">{{ episode.title }}</a>
</td> </td>
<td class="col-md-9"> <td class="col-md-9">
<ul> <ul>
......
{% comment %}
This is adapted from: https://ricostacruz.com/til/relative-paths-in-jekyll
`page.url` gives the URL of the current page with a leading /:
- when the URL ends with the extension (e.g., /foo/bar.html) then we can get
the depth by counting the number of / and remove - 1
- when the URL ends with a / (e.g. /foo/bar/) then the number / gives the depth
directly
{% endcomment %}
{% assign relative_root_path = '' %}
{% assign last_char = page.url | slice: -1 %}
{% if last_char == "/"}
{% assign offset = 0 %}
{% else %}
{% assign offset = 1 %}
{% endif %}
{% assign depth = page.url | split: '/' | size | minus: offset %}
{% if depth <= 1 %}{% assign relative_root_path = '.' %}
{% elsif depth == 2 %}{% assign relative_root_path = '..' %}
{% elsif depth == 3 %}{% assign relative_root_path = '../..' %}
{% elsif depth == 4 %}{% assign relative_root_path = '../../..' %}
{% endif %}
{% comment %} {% comment %}
General description of Software and Data Carpentry. General description of Software and Data Carpentry.
{% endcomment %} {% endcomment %}
{% include base_path.html %}
<div class="row"> <div class="row">
<div class="col-md-2" align="center"> <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> <a href="{{ site.carpentries_site }}"><img src="{{ relative_root_path }}/assets/img/cp-logo-blue.svg" alt="The Carpentries logo" /></a>
</div> </div>
<div class="col-md-8"> <div class="col-md-8">
Since 1998, <p><a href="{{ site.carpentries_site }}">The Carpentries</a> comprises
<a href="{{ site.swc_site }}">Software Carpentry</a> Software Carpentry and Data Carpentry, communities of Instructors, Trainers,
has been teaching researchers in science, engineering, medicine, and related disciplines Maintainers, helpers, and supporters who share a mission to teach
the computing skills they need to get more done in less time and with less pain. foundational coding and data science skills to researchers. In January,
Its volunteer instructors have run hundreds of events 2018, The Carpentries was formed by the merger of Software Carpentry and
for thousands of learners in the past two and a half years. Data Carpentry.</p>
<p>While individual lessons and workshops continue to be run under each
lesson project, The Carpentries provide overall staffing and governance, as
well as support for assessment, instructor training and mentoring.
Memberships are joint, and the Carpentries project maintains a shared Code
of Conduct. The Carpentries is a fiscally sponsored project of Community
Initiatives, a registered 501(c)3 non-profit based in California, USA.</p>
</div>
</div>
<div class="row">
<div class="col-md-2" align="center">
<a href="{{ site.swc_site }}"><img src="{{ relative_root_path }}/assets/img/swc-icon-blue.svg" alt="Software Carpentry logo" /></a>
</div>
<div class="col-md-8">
<p>Since 1998, <a href="{{ site.swc_site }}">Software Carpentry</a> has
been teaching researchers across all disciplines the foundational coding
skills they need to get more done in less time and with less pain. Its
volunteer instructors have run hundreds of events for thousands of learners
around the world. Now that all research involves some degree of
computational work, whether with big data, cloud computing, or simple task
automation, these skills are needed more than ever.</p>
</div> </div>
</div> </div>
<br/> <br/>
<div class="row"> <div class="row">
<div class="col-md-2" align="center"> <div class="col-md-2" align="center">
<a href="{{ site.dc_site }}"><img src="{{ page.root }}/assets/img/dc-icon-black.svg" alt="Data Carpentry logo" /></a> <a href="{{ site.dc_site }}"><img src="{{ relative_root_path }}/assets/img/dc-icon-black.svg" alt="Data Carpentry logo" /></a>
</div> </div>
<div class="col-md-8"> <div class="col-md-8">
<a href="{{ site.dc_site }}">Data Carpentry</a> develops and teaches workshops on the fundamental data skills needed to conduct research. <p><a href="{{ site.dc_site }}">Data Carpentry</a> develops and teaches
Its target audience is researchers who have little to no prior computational experience, workshops on the fundamental data skills needed to conduct research. Its
and its lessons are domain specific, target audience is researchers who have little to no prior computational
building on learners' existing knowledge to enable them to quickly apply skills learned to their own research. experience, and its lessons are domain specific, building on learners'
existing knowledge to enable them to quickly apply skills learned to their
own research. Data Carpentry workshops take researchers through the entire
data life cycle.</p>
</div> </div>
</div> </div>
<br/> <br/>
<div class="row"> <div class="row">
<div class="col-md-2" align="center"> <div class="col-md-2" align="center">
<a href="{{ site.lc_site }}"><img src="{{ page.root }}/assets/img/lc-icon-black.png" alt="Library Carpentry logo" /></a> <a href="{{ site.lc_site }}"><img src="{{ relative_root_path }}/assets/img/lc-icon-black.png" alt="Library Carpentry logo" /></a>
</div> </div>
<div class="col-md-8"> <div class="col-md-8">
<a href="{{ site.lc_site }}">Library Carpentry</a> is made by librarians to help librarians <p><a href="{{ site.lc_site }}">Library Carpentry</a> is in discussions with
automate repetitive, boring, error-prone tasks; The Carpentries to be a Lesson Project, like Software Carpentry*
create, maintain and analyse sustainable and reusable data; and Data Carpentry. Library Carpentry develops lessons and
work effectively with IT and systems colleagues; teaches workshops for and with people working in library- and
better understand the use of software in research; information-related roles. Its goal is to create an on-ramp to empower this
and much more. community to use software and data in their own work, as well as be
Library Carpentry was the winner of the 2016 advocates for and train others in efficient, effective and reproducible data
<a href="http://labs.bl.uk/British+Library+Labs+Awards">British Library Labs Teaching and Learning Award</a>. and software practices.</p>
</div> </div>
</div> </div>
{% comment %}
For some reason, the relative_root_path seems out of scope in this file, so we
need to re-assign it here
{% endcomment %}
{% include base_path.html %}
{% comment %} {% comment %}
Navigation bar for an episode. Navigation bar for an episode.
{% endcomment %} {% endcomment %}
<div class="row"> <div class="row">
<div class="col-xs-1"> <div class="col-xs-1">
<h3 class="text-left"> <h3 class="text-left">
{% if page.previous.url %} {% 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> <a href="{{ relative_root_path }}{{ page.previous.url }}"><span class="glyphicon glyphicon-menu-left" aria-hidden="true"></span><span class="sr-only">previous episode</span></a>
{% else %} {% else %}
<a href="{{ page.root }}/"><span class="glyphicon glyphicon-menu-up" aria-hidden="true"></span><span class="sr-only">lesson home</span></a> <a href="{{ relative_root_path }}/"><span class="glyphicon glyphicon-menu-up" aria-hidden="true"></span><span class="sr-only">lesson home</span></a>
{% endif %} {% endif %}
</h3> </h3>
</div> </div>
<div class="col-xs-10"> <div class="col-xs-10">
{% if include.episode_navbar_title %} {% if include.episode_navbar_title %}
<h3 class="maintitle"><a href="{{ page.root }}/">{{ site.title }}</a></h3> <h3 class="maintitle"><a href="{{ relative_root_path }}/">{{ site.title }}</a></h3>
{% endif %} {% endif %}
</div> </div>
<div class="col-xs-1"> <div class="col-xs-1">
<h3 class="text-right"> <h3 class="text-right">
{% if page.next.url %} {% 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> <a href="{{ relative_root_path }}{{ page.next.url }}"><span class="glyphicon glyphicon-menu-right" aria-hidden="true"></span><span class="sr-only">next episode</span></a>
{% else %} {% else %}
<a href="{{ page.root }}/"><span class="glyphicon glyphicon-menu-up" aria-hidden="true"></span><span class="sr-only">lesson home</span></a> <a href="{{ relative_root_path }}/"><span class="glyphicon glyphicon-menu-up" aria-hidden="true"></span><span class="sr-only">lesson home</span></a>
{% endif %} {% endif %}
</h3> </h3>
</div> </div>
......
{% assign favicon_url = site.baseurl | append: '/assets/favicons/' | append: site.carpentry | prepend: site.url %} {% assign favicon_url = relative_root_path | append: '/assets/favicons/' | append: site.carpentry %}
{% if site.carpentry == 'swc' %} {% if site.carpentry == 'swc' %}
{% assign carpentry = 'Software Carpentry' %} {% assign carpentry = 'Software Carpentry' %}
......
{% comment %}
When rendering websites locally, `site.github.url` doesn't get resolved properly
unless a GitHub Personal Access Token is set up and available in the
environment. This leads to warnings and errors when trying to serve the site
locally. To work around this, we use the `jekyll.environment` variable which is
set to `development` when rendering the site locally, and set to `production` on
GitHub where `site.github.url` is defined.
{% endcomment %}
{% if jekyll.environment == "production" %}
{% comment %}
First, get the name of the repository
{% endcomment %}
{% assign repo_name = site.github.repository_name %}
{% comment %}
`site.github.public_repositories` contains comprehensive information for all public repositories for the organization. We use `where` to extract the part
of the metadata that is relevant to the present repository.
{% endcomment %}
{% assign repo_info = site.github.public_repositories | where: "name", repo_name %}
{% comment %}
Now, we can extract the default branch for the repo
{% endcomment %}
{% assign default_branch = repo_info[0].default_branch %}
{% comment %}
Other variables requested by the template
{% endcomment %}
{% assign repo_url = site.github.repository_url %}
{% assign search_domain_url = site.github.url %}
{% assign project_title = site.github.project_title %}
{% assign source_branch = site.github.source.branch %}
{% elsif jekyll.environment == "development" %}
{% assign repo_name = "" %}
{% assign repo_url = "" %}
{% assign default_branch = "" %}
{% assign search_domain_url = "" %}
{% assign project_title = "" %}
{% assign source_branch = "" %}
{% endif %}
{% comment %} {% comment %}
Javascript used in lesson and workshop pages. JavaScript used in lesson and workshop pages.
{% endcomment %} {% endcomment %}
<script src="{{ page.root }}/assets/js/jquery.min.js"></script> <script src="{{ relative_root_path }}/assets/js/jquery.min.js"></script>
<script src="{{ page.root }}/assets/js/bootstrap.min.js"></script> <script src="{{ relative_root_path }}/assets/js/bootstrap.min.js"></script>
<script src="{{ page.root }}/assets/js/lesson.js"></script> <script src="{{ relative_root_path }}/assets/js/lesson.js"></script>
<script> <script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
</p> </p>
<ul> <ul>
<li>automate repetitive, boring, error-prone tasks</li> <li>automate repetitive, boring, error-prone tasks</li>
<li>create, maintain and analyse sustainable and reusable data</li> <li>create, maintain and analyze sustainable and reusable data</li>
<li>work effectively with IT and systems colleagues</li> <li>work effectively with IT and systems colleagues</li>
<li>better understand the use of software in research</li> <li>better understand the use of software in research</li>
<li>and much more...</li> <li>and much more...</li>
......
{% comment %} {% comment %}
Footer for lesson pages. Footer for lesson pages.
{% endcomment %} {% endcomment %}
{% include gh_variables.html %}
<footer> <footer>
<div class="row"> <div class="row">
<div class="col-md-6 copyright" align="left"> <div class="col-md-6 copyright" align="left">
{% if site.carpentry == "swc" %} {% if site.carpentry == "swc" %}
Copyright &copy; 2018–{{ 'now' | date: "%Y" }} Licensed under <a href="{{ site.cc_by_human }}">CC-BY 4.0</a> 2018–{{ 'now' | date: "%Y" }}
<a href="{{ site.carpentries_site }}">The Carpentries</a> by <a href="{{ site.carpentries_site }}">The Carpentries</a>
<br> <br>
Copyright &copy; 2016–2018 Licensed under <a href="{{ site.cc_by_human }}">CC-BY 4.0</a> 2016–2018
<a href="{{ site.swc_site }}">Software Carpentry Foundation</a> by <a href="{{ site.swc_site }}">Software Carpentry Foundation</a>
{% elsif site.carpentry == "dc" %} {% elsif site.carpentry == "dc" %}
Copyright &copy; 2018–{{ 'now' | date: "%Y" }} Licensed under <a href="{{ site.cc_by_human }}">CC-BY 4.0</a> 2018–{{ 'now' | date: "%Y" }}
<a href="{{ site.carpentries_site }}">The Carpentries</a> by <a href="{{ site.carpentries_site }}">The Carpentries</a>
<br> <br>
Copyright &copy; 2016–2018 Licensed under <a href="{{ site.cc_by_human }}">CC-BY 4.0</a> 2016–2018
<a href="{{ site.dc_site }}">Data Carpentry</a> by <a href="{{ site.dc_site }}">Data Carpentry</a>
{% elsif site.carpentry == "lc" %} {% elsif site.carpentry == "lc" %}
Copyright &copy; 2016–{{ 'now' | date: "%Y" }} Licensed under <a href="{{ site.cc_by_human }}">CC-BY 4.0</a> 2016–{{ 'now' | date: "%Y" }}
<a href="{{ site.lc_site }}">Library Carpentry</a> by <a href="{{ site.lc_site }}">Library Carpentry</a>
{% elsif site.carpentry == "cp" %} {% elsif site.carpentry == "cp" %}
Copyright &copy; 2018–{{ 'now' | date: "%Y" }} Licensed under <a href="{{ site.cc_by_human }}">CC-BY 4.0</a> 2018–{{ 'now' | date: "%Y" }}
<a href="{{ site.carpentries_site }}">The Carpentries</a> by <a href="{{ site.carpentries_site }}">The Carpentries</a>
{% endif %} {% endif %}
</div> </div>
<div class="col-md-6 help-links" align="right"> <div class="col-md-6 help-links" align="right">
{% if page.source %} {% if page.source %}
{% if page.source == "Rmd" %} {% if page.source == "Rmd" %}
<a href="{{site.github.repository_url}}/edit/gh-pages/{{page.path|replace: "_episodes", "_episodes_rmd" | replace: ".md", ".Rmd"}}">Edit on GitHub</a> <a href="{{repo_url}}/edit/{{ default_branch }}/{{page.path|replace: "_episodes", "_episodes_rmd" | replace: ".md", ".Rmd"}}">Edit on GitHub</a>
{% endif %} {% endif %}
{% else %} {% else %}
<a href="{{site.github.repository_url}}/edit/gh-pages/{{page.path}}">Edit on GitHub</a> <a href="{{repo_url}}/edit/{{ default_branch }}/{{page.path}}">Edit on GitHub</a>
{% endif %} {% endif %}
/ /
<a href="{{ site.github.repository_url }}/blob/gh-pages/CONTRIBUTING.md">Contributing</a> <a href="{{ repo_url }}/blob/{{ source_branch }}/CONTRIBUTING.md">Contributing</a>
/ /
<a href="{{ site.github.repository_url }}/">Source</a> <a href="{{ repo_url }}/">Source</a>
/ /
<a href="{{ site.github.repository_url }}/blob/gh-pages/CITATION">Cite</a> <a href="{{ repo_url }}/blob/{{ source_branch }}/CITATION">Cite</a>
/ /
<a href="mailto:{{ site.email }}">Contact</a> <a href="mailto:{{ site.email }}">Contact</a>
</div> </div>
...@@ -45,7 +48,7 @@ ...@@ -45,7 +48,7 @@
<div class="row"> <div class="row">
<div class="col-md-12" align="center"> <div class="col-md-12" align="center">
Using <a href="https://github.com/carpentries/styles/">The Carpentries style</a> Using <a href="https://github.com/carpentries/styles/">The Carpentries style</a>
version <a href="https://github.com/carpentries/styles/releases/tag/v9.5.2">9.5.2</a>. version <a href="https://github.com/carpentries/styles/releases/tag/v9.5.3">9.5.3</a>.
</div> </div>
</div> </div>
</footer> </footer>
{% if site.life_cycle == "pre-alpha" %}
<div class="panel panel-default life-cycle">
<div id="life-cycle" class="panel-body pre-alpha">
This lesson is still being designed and assembled (Pre-Alpha version)
</div>
</div>
{% elsif site.life_cycle == "alpha" %}
<div class="panel panel-default life-cycle">
<div id="life-cycle" class="panel-body alpha">
This lesson is in the early stages of development (Alpha version)
</div>
</div>
{% elsif site.life_cycle == "beta" %}
<div class="panel panel-default life-cycle">
<div id="life-cycle" class="panel-body beta">
This lesson is being piloted (Beta version)
</div>
</div>
{% elsif site.life_cycle == "stable" %}
{% comment %}
We don't do anything special for now
{% endcomment %}
{% endif %}
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
[coc]: https://docs.carpentries.org/topic_folders/policies/code-of-conduct.html [coc]: https://docs.carpentries.org/topic_folders/policies/code-of-conduct.html
[concept-maps]: https://carpentries.github.io/instructor-training/05-memory/ [concept-maps]: https://carpentries.github.io/instructor-training/05-memory/
[contrib-covenant]: https://contributor-covenant.org/ [contrib-covenant]: https://contributor-covenant.org/
[contributing]: {{ site.github.repository_url }}/blob/gh-pages/CONTRIBUTING.md [contributing]: {{ repo_url }}/blob/{{ source_branch }}/CONTRIBUTING.md
[cran-checkpoint]: https://cran.r-project.org/package=checkpoint [cran-checkpoint]: https://cran.r-project.org/package=checkpoint
[cran-knitr]: https://cran.r-project.org/package=knitr [cran-knitr]: https://cran.r-project.org/package=knitr
[cran-stringr]: https://cran.r-project.org/package=stringr [cran-stringr]: https://cran.r-project.org/package=stringr
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
[ruby-installer]: https://rubyinstaller.org/ [ruby-installer]: https://rubyinstaller.org/
[rubygems]: https://rubygems.org/pages/download/ [rubygems]: https://rubygems.org/pages/download/
[styles]: https://github.com/carpentries/styles/ [styles]: https://github.com/carpentries/styles/
[swc-lessons]: https://software-carpentry.org/lessons/ [swc-lessons]: https://software-carpentry.org/lessons/
[swc-releases]: https://github.com/swcarpentry/swc-releases [swc-releases]: https://github.com/swcarpentry/swc-releases
[workshop-repo]: {{ site.workshop_repo }} [workshop-repo]: {{ site.workshop_repo }}
[yaml]: http://yaml.org/ [yaml]: http://yaml.org/
{% comment %} {% comment %}
Main title for lesson pages. Main title for lesson pages.
{% endcomment %} {% endcomment %}
<h1 class="maintitle"><a href="{{ page.root }}{% link index.md %}">{{ site.title }}</a>{% if page.title %}: {{ page.title }}{% endif %}</h1>
{% include base_path.html %}
<h1 class="maintitle"><a href="{{ relative_root_path }}{% link index.md %}">{{ site.title }}</a>{% if page.title %}: {{ page.title }}{% endif %}</h1>
{% comment %} {% comment %}
Lesson navigation bar. Lesson navigation bar.
{% endcomment %} {% endcomment %}
{% include gh_variables.html %}
<nav class="navbar navbar-default"> <nav class="navbar navbar-default">
<div class="container-fluid"> <div class="container-fluid">
<div class="navbar-header"> <div class="navbar-header">
...@@ -14,45 +17,45 @@ ...@@ -14,45 +17,45 @@
{% comment %} Select what logo to display. {% endcomment %} {% comment %} Select what logo to display. {% endcomment %}
{% if site.carpentry == "swc" %} {% if site.carpentry == "swc" %}
<a href="{{ site.swc_site }}" class="pull-left"> <a href="{{ site.swc_site }}" class="pull-left">
<img class="navbar-logo" src="{{ page.root }}/assets/img/swc-icon-blue.svg" alt="Software Carpentry logo" /> <img class="navbar-logo" src="{{ relative_root_path }}{% link /assets/img/swc-icon-blue.svg %}" alt="Software Carpentry logo" />
</a> </a>
{% elsif site.carpentry == "dc" %} {% elsif site.carpentry == "dc" %}
<a href="{{ site.dc_site }}" class="pull-left"> <a href="{{ site.dc_site }}" class="pull-left">
<img class="navbar-logo" src="{{ page.root }}/assets/img/dc-icon-black.svg" alt="Data Carpentry logo" /> <img class="navbar-logo" src="{{ relative_root_path }}{% link /assets/img/dc-icon-black.svg %}" alt="Data Carpentry logo" />
</a> </a>
{% elsif site.carpentry == "lc" %} {% elsif site.carpentry == "lc" %}
<a href="{{ site.lc_site }}" class="pull-left"> <a href="{{ site.lc_site }}" class="pull-left">
<img class="navbar-logo" src="{{ page.root }}/assets/img/lc-icon-black.svg" alt="Library Carpentry logo" /> <img class="navbar-logo" src="{{ relative_root_path }}{% link /assets/img/lc-icon-black.svg %}" alt="Library Carpentry logo" />
</a> </a>
{% elsif site.carpentry == "cp" %} {% elsif site.carpentry == "cp" %}
<a href="{{ site.carpentries_site }}" class="pull-left"> <a href="{{ site.carpentries_site }}" class="pull-left">
<img class="navbar-logo" src="{{ page.root }}/assets/img/cp-logo-blue.svg" alt="The Carpentries logo" /> <img class="navbar-logo" src="{{ relative_root_path }}{% link /assets/img/cp-logo-blue.svg %}" alt="The Carpentries logo" />
</a> </a>
{% endif %} {% endif %}
{% comment %} Always show link to home page. {% endcomment %} {% comment %} Always show link to home page. {% endcomment %}
<a class="navbar-brand" href="{{ page.root }}{% link index.md %}">Home</a> <a class="navbar-brand" href="{{ relative_root_path }}{% link index.md %}">Home</a>
</div> </div>
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1"> <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
<ul class="nav navbar-nav"> <ul class="nav navbar-nav">
{% comment %} Always show code of conduct. {% endcomment %} {% comment %} Always show code of conduct. {% endcomment %}
<li><a href="{{ page.root }}{% link CODE_OF_CONDUCT.md %}">Code of Conduct</a></li> <li><a href="{{ relative_root_path }}{% link CODE_OF_CONDUCT.md %}">Code of Conduct</a></li>
{% if site.kind == "lesson" %} {% if site.kind == "lesson" %}
{% comment %} Show setup instructions. {% endcomment %} {% comment %} Show setup instructions. {% endcomment %}
<li><a href="{{ page.root }}{% link setup.md %}">Setup</a></li> <li><a href="{{ relative_root_path }}{% link setup.md %}">Setup</a></li>
{% comment %} Show lesson episodes for lessons. {% endcomment %} {% comment %} Show lesson episodes for lessons. {% endcomment %}
<li class="dropdown"> <li class="dropdown">
<a href="{{ page.root }}/" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">Episodes <span class="caret"></span></a> <a href="{{ relative_root_path }}/" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">Episodes <span class="caret"></span></a>
<ul class="dropdown-menu"> <ul class="dropdown-menu">
{% for episode in site.episodes %} {% for episode in site.episodes %}