Skip to content

Commit 6b8bbad

Browse files
authored
Merge pull request #639 from carpentries/update-transition-workflow
modify transition workflow/variables
2 parents 078eec5 + 07553b2 commit 6b8bbad

File tree

5 files changed

+45
-41
lines changed

5 files changed

+45
-41
lines changed

_includes/check_transition_variables.html

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,21 @@
11
{% assign date = include.need_transition_date %}
22

3-
{% unless site.transition_url %}
3+
{% if date == "true" %}
4+
{% unless site.transition_date_prebeta %}
45
<div class="alert alert-danger">
5-
you need to specify the variable <code>transition_url</code>
6+
you need to specify the variable <code>transition_date_prebeta</code>
67
in <code>_config.yml</code>.
78
</div>
89
{% endunless %}
9-
10-
{% if date == "true" %}
11-
{% unless site.transition_date %}
10+
{% unless site.transition_date_beta %}
11+
<div class="alert alert-danger">
12+
you need to specify the variable <code>transition_date_beta</code>
13+
in <code>_config.yml</code>.
14+
</div>
15+
{% endunless %}
16+
{% unless site.transition_date_prerelease %}
1217
<div class="alert alert-danger">
13-
you need to specify the variable <code>transition_date</code>
18+
you need to specify the variable <code>transition_date_prerelease</code>
1419
in <code>_config.yml</code>.
1520
</div>
1621
{% endunless %}

_includes/lesson_footer.html

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,13 @@
2828
{% endif %}
2929
</div>
3030
<div class="col-md-6 help-links" align="right">
31-
{% if site.life_cycle contains 'transition-step' %}
32-
<a href="{{repo_url}}">Edit on GitHub</a>
33-
{% elsif page.source == "Rmd" %}
34-
<a href="{{repo_url}}/edit/{{ default_branch }}/{{page.path|replace: "_episodes", "_episodes_rmd" | replace: ".md", ".Rmd"}}" data-checker-ignore>Edit on GitHub</a>
35-
{% else %}
36-
<a href="{{repo_url}}/edit/{{ default_branch }}/{{page.path}}" data-checker-ignore>Edit on GitHub</a>
37-
{% endif %}
31+
{% if site.life_cycle == 'transition-step-2' %}
32+
<a href="{{repo_url}}">Edit on GitHub</a>
33+
{% elsif page.source == "Rmd" %}
34+
<a href="{{repo_url}}/edit/{{ default_branch }}/{{page.path|replace: "_episodes", "_episodes_rmd" | replace: ".md", ".Rmd"}}" data-checker-ignore>Edit on GitHub</a>
35+
{% else %}
36+
<a href="{{repo_url}}/edit/{{ default_branch }}/{{page.path}}" data-checker-ignore>Edit on GitHub</a>
37+
{% endif %}
3838
/
3939
<a href="{{ repo_url }}/blob/{{ source_branch }}/CONTRIBUTING.md" data-checker-ignore>Contributing</a>
4040
/

_includes/life_cycle.html

Lines changed: 26 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -33,39 +33,42 @@
3333

3434

3535
{% comment %}
36-
Below we cover the 3 phases of lesson transition towards the Carpentries Workbench:
37-
- transition-step-1 (`transition_url` variable needed): we indicate that there
38-
is a new version of the lesson that is available for testing, and that it will be deprecated in the future.
39-
- 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.
40-
- transition-step-3 (`transition_url` variable needed): the lesson is fully deprecated, and a redirect is set up to the new URL
36+
Below we cover the 2 phases of lesson transition towards the Carpentries Workbench:
37+
Variables needed:
38+
- transition_date_prebeta: the date of the prebeta stage
39+
- transition_date_beta: the date of the beta stage
40+
- transition_date_prerelease: the date of the prerelease stage
41+
42+
- transition-step-1: We notify that there is a snapshot of the lesson available for testing, and that it will supersede this version.
43+
- 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.
4144
{% endcomment %}
4245

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

4649
<div class="alert alert-warning life-cycle">
47-
A newer version of this lesson is being tested on The Carpentries Workbench:
48-
<a href="{{ site.transition_url }}">{{ site.transition_url }}</a>.
49-
The Jekyll version of this lesson will become deprecated in the near future.
50+
A snapshot of this lesson from {{ site.transition_date_prebeta }} is being tested on
51+
<a href='https://carpentries.github.io/workbench'>The Carpentries Workbench</a>:
52+
<a href="https://preview.carpentries.org/{{ repo_name }}">https://preview.carpentries.org/{{ repo_name }}</a>.
53+
<br>
54+
<b>The Workbench version of this lesson will become default on {{ site.transition_date_prerelease }}</b>.
55+
<button type="button" style="border: true; position: absolute; top: 10px; right: 27px; color: #383838;" class="close" data-dismiss="alert" aria-label="Close">
56+
<span aria-hidden="true" style='font-size:34pt'>&times;</span>
57+
</button>
5058
</div>
5159

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

55-
<div class="alert alert-danger life-cycle">
56-
A newer version of this lesson is available from:
57-
<a href="{{ site.transition_url }}">{{ site.transition_url }}</a>.
58-
The Jekyll version of this lesson will become deprecated on
59-
{{ site.transition_date }}.
60-
</div>
61-
62-
{% elsif site.life_cycle == "transition-step-3" %}
63-
{% include check_transition_variables.html need_transition_date = 'false' %}
64-
65-
<div class="alert alert-danger life-cycle">
66-
You are veiwing a deprecated version of this lesson. An updated version is
67-
available from:
68-
<a href="{{ site.transition_url }}">{{ site.transition_url }}</a>.
63+
<div class="alert alert-danger alert-dismissible life-cycle" role="alert">
64+
This lesson is a <b>snapshot from {{ site.transition_date_beta }}</b>.
65+
A newer version is being tested on <a href='https://carpentries.github.io/workbench'>The Carpentries Workbench</a>:
66+
<a href="https://preview.carpentries.org/{{ repo_name }}">https://preview.carpentries.org/{{ repo_name }}</a>.
67+
<br>
68+
<b>The Workbench version of this lesson will become default on {{ site.transition_date_prerelease }}</b>.
69+
<button type="button" style="border: true; position: absolute; top: 10px; right: 27px; color: #383838;" class="close" data-dismiss="alert" aria-label="Close">
70+
<span aria-hidden="true" style='font-size:34pt'>&times;</span>
71+
</button>
6972
</div>
7073

7174
{% endif %}

_includes/navbar.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@
9494

9595
{% comment %} Always show license. {% endcomment %}
9696
<li><a href="{{ relative_root_path }}{% link LICENSE.md %}">License</a></li>
97-
{% if site.life_cycle contains 'transition-step' %}
97+
{% if site.life_cycle == 'transition-step-1' %}
9898
<li><a href="{{repo_url}}">Improve this page <span class="glyphicon glyphicon-pencil" aria-hidden="true"></span></a></li>
9999
{% elsif page.source == "Rmd" %}
100100
<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>

_layouts/base.html

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,6 @@
2323

2424
{% include favicons.html %}
2525

26-
{% if site.life_cycle == 'transition-step-3' %}
27-
<meta http-equiv="refresh" content="0; url={{ site.transition_url }}" />
28-
{% endif %}
29-
3026
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
3127
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
3228
<!--[if lt IE 9]>

0 commit comments

Comments
 (0)