Unverified Commit 078eec5d authored by Zhian N. Kamvar's avatar Zhian N. Kamvar Committed by GitHub
Browse files

Merge pull request #637 from fmichonneau/add-transition

add new steps to transition lessons to Workbench
parents bd9f2747 e6aed98f
Loading
Loading
Loading
Loading
+17 −0
Original line number Diff line number Diff line
{% assign date = include.need_transition_date %}

{% unless site.transition_url %}
<div class="alert alert-danger">
  you need to specify the variable <code>transition_url</code>
  in <code>_config.yml</code>.
</div>
{% endunless %}

{% if date == "true" %}
{% unless site.transition_date %}
<div class="alert alert-danger">
  you need to specify the variable <code>transition_date</code>
  in <code>_config.yml</code>.
</div>
{% endunless %}
{% endif %}
+3 −3
Original line number Diff line number Diff line
@@ -28,10 +28,10 @@
	{% endif %}
    </div>
    <div class="col-md-6 help-links" align="right">
	{% if page.source %}
	{% if page.source == "Rmd" %}
        {% if site.life_cycle contains 'transition-step' %}
        <a href="{{repo_url}}">Edit on GitHub</a>
        {% elsif page.source == "Rmd" %}
	<a href="{{repo_url}}/edit/{{ default_branch }}/{{page.path|replace: "_episodes", "_episodes_rmd" | replace: ".md", ".Rmd"}}" data-checker-ignore>Edit on GitHub</a>
	{% endif %}
	{% else %}
	<a href="{{repo_url}}/edit/{{ default_branch }}/{{page.path}}" data-checker-ignore>Edit on GitHub</a>
	{% endif %}
+46 −2
Original line number Diff line number Diff line
@@ -28,7 +28,52 @@
{% elsif site.life_cycle == "stable" %}

{% comment %}
We do not do anything special unless this is a Carpentries Lab lesson
We do not do anything special for lessons in stable
{% endcomment %}


{% comment %}
Below we cover the 3 phases of lesson transition towards the Carpentries Workbench:
- transition-step-1 (`transition_url` variable needed): we indicate that there
is a new version of the lesson that is available for testing, and that it will be deprecated in the future.
- transition-step-2 (`transition_url` and `transition_date` variables needed): we indicate that a new version of the lesson is avaiable with a deprecation date.
- transition-step-3 (`transition_url` variable needed): the lesson is fully deprecated, and a redirect is set up to the new URL
{% endcomment %}

{% elsif site.life_cycle == "transition-step-1" %}
{% include check_transition_variables.html need_transition_date = 'false' %}

<div class="alert alert-warning life-cycle">
  A newer version of this lesson is being tested on The Carpentries Workbench:
  <a href="{{ site.transition_url }}">{{ site.transition_url }}</a>.
  The Jekyll version of this lesson will become deprecated in the near future.
</div>

{% elsif site.life_cycle == "transition-step-2" %}
{% include check_transition_variables.html need_transition_date = 'true' %}

<div class="alert alert-danger life-cycle">
  A newer version of this lesson is available from:
  <a href="{{ site.transition_url }}">{{ site.transition_url }}</a>.
  The Jekyll version of this lesson will become deprecated on
  {{ site.transition_date }}.
</div>

{% elsif site.life_cycle == "transition-step-3" %}
{% include check_transition_variables.html need_transition_date = 'false' %}

<div class="alert alert-danger life-cycle">
  You are veiwing a deprecated version of this lesson. An updated version is
  available from:
  <a href="{{ site.transition_url }}">{{ site.transition_url }}</a>.
</div>

{% endif %}



{% comment %}
For Carpentries Lab lessons we add a banner about the review status
{% endcomment %}

{% if site.carpentry == "lab" %}
@@ -43,4 +88,3 @@ We do not do anything special unless this is a Carpentries Lab lesson
  </div>
</div>
{% endif %}
{% endif %}
+4 −4
Original line number Diff line number Diff line
@@ -94,10 +94,10 @@

	{% comment %} Always show license. {% endcomment %}
        <li><a href="{{ relative_root_path }}{% link LICENSE.md %}">License</a></li>
	{% if page.source %}
	{% if page.source == "Rmd" %}
        {% if site.life_cycle contains 'transition-step' %}
        <li><a href="{{repo_url}}">Improve this page <span class="glyphicon glyphicon-pencil" aria-hidden="true"></span></a></li>
        {% elsif page.source == "Rmd" %}
	<li><a href="{{repo_url}}/edit/{{ default_branch }}/{{page.path|replace: "_episodes", "_episodes_rmd" | replace: ".md", ".Rmd"}}" data-checker-ignore>Improve this page <span class="glyphicon glyphicon-pencil" aria-hidden="true"></span></a></li>
	{% endif %}
	{% else %}
	<li><a href="{{repo_url}}/edit/{{ default_branch }}/{{page.path}}" data-checker-ignore>Improve this page <span class="glyphicon glyphicon-pencil" aria-hidden="true"></span></a></li>
	{% endif %}
+5 −1
Original line number Diff line number Diff line
@@ -23,6 +23,10 @@

    {% include favicons.html %}

    {% if site.life_cycle == 'transition-step-3' %}
    <meta http-equiv="refresh" content="0; url={{ site.transition_url }}" />
    {% endif %}

    <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
    <!--[if lt IE 9]>
Loading