Unverified Commit 6b8bbad1 authored by Zhian N. Kamvar's avatar Zhian N. Kamvar Committed by GitHub
Browse files

Merge pull request #639 from carpentries/update-transition-workflow

modify transition workflow/variables
parents 078eec5d 07553b2f
Loading
Loading
Loading
Loading
+11 −6
Original line number Diff line number Diff line
{% assign date = include.need_transition_date %}

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

{% if date == "true" %}
{% unless site.transition_date %}
{% unless site.transition_date_beta %}
<div class="alert alert-danger">
  you need to specify the variable <code>transition_date_beta</code>
  in <code>_config.yml</code>.
</div>
{% endunless %}
{% unless site.transition_date_prerelease %}
<div class="alert alert-danger">
  you need to specify the variable <code>transition_date</code>
  you need to specify the variable <code>transition_date_prerelease</code>
  in <code>_config.yml</code>.
</div>
{% endunless %}
+7 −7
Original line number Diff line number Diff line
@@ -28,7 +28,7 @@
	{% endif %}
    </div>
    <div class="col-md-6 help-links" align="right">
        {% if site.life_cycle contains 'transition-step' %}
    {% if site.life_cycle == 'transition-step-2' %}
    <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>
+26 −23
Original line number Diff line number Diff line
@@ -33,39 +33,42 @@ We do not do anything special for lessons in stable


{% 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
Below we cover the 2 phases of lesson transition towards the Carpentries Workbench:
Variables needed:
  - transition_date_prebeta: the date of the prebeta stage
  - transition_date_beta: the date of the beta stage
  - transition_date_prerelease: the date of the prerelease stage

- transition-step-1: We notify that there is a snapshot of the lesson available for testing, and that it will supersede this version.
- transition-step-2 We indicate that this version of the lesson is a snapshot and a new version of the lesson is avaiable and will supersede this version at a given date.
{% endcomment %}

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

<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.
  A snapshot of this lesson from {{ site.transition_date_prebeta }} is being tested on
  <a href='https://carpentries.github.io/workbench'>The Carpentries Workbench</a>:
  <a href="https://preview.carpentries.org/{{ repo_name }}">https://preview.carpentries.org/{{ repo_name }}</a>.
  <br>
  <b>The Workbench version of this lesson will become default on {{ site.transition_date_prerelease }}</b>.
  <button type="button" style="border: true; position: absolute; top: 10px; right: 27px; color: #383838;" class="close" data-dismiss="alert" aria-label="Close">
    <span aria-hidden="true" style='font-size:34pt'>&times;</span>
  </button>
</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 class="alert alert-danger alert-dismissible life-cycle" role="alert">
  This lesson is a <b>snapshot from {{ site.transition_date_beta }}</b>.
  A newer version is being tested on <a href='https://carpentries.github.io/workbench'>The Carpentries Workbench</a>:
  <a href="https://preview.carpentries.org/{{ repo_name }}">https://preview.carpentries.org/{{ repo_name }}</a>.
  <br>
  <b>The Workbench version of this lesson will become default on {{ site.transition_date_prerelease }}</b>.
  <button type="button" style="border: true; position: absolute; top: 10px; right: 27px; color: #383838;" class="close" data-dismiss="alert" aria-label="Close">
    <span aria-hidden="true" style='font-size:34pt'>&times;</span>
  </button>
</div>

{% endif %}
+1 −1
Original line number Diff line number Diff line
@@ -94,7 +94,7 @@

	{% comment %} Always show license. {% endcomment %}
        <li><a href="{{ relative_root_path }}{% link LICENSE.md %}">License</a></li>
        {% if site.life_cycle contains 'transition-step' %}
        {% if site.life_cycle == 'transition-step-1' %}
        <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>
+0 −4
Original line number Diff line number Diff line
@@ -23,10 +23,6 @@

    {% 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]>