Unverified Commit 2a6d5851 authored by François Michonneau's avatar François Michonneau
Browse files

add new steps to transition lessons to Workbench

parent 106e502f
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 %}
+42 −2
Original line number Diff line number Diff line
@@ -28,7 +28,48 @@
{% 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 if 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:
  <a href="{{ site.transition_url }}">{{ site.transition_url }}</a>.
  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>.
  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">
    This lesson is deprecated. A newer 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 +84,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