Skip to content

Commit bea5253

Browse files
committed
Replace the Carpentries template files with the carpentries-theme
Jekyll allows for remote themes! This makes it a lot easier and cleaner to use a theme than the old fashioned method of including the theme files in the repository directly. By removing these files and tweaking our config, we can move forward knowing that our site will automagically build against the latest, prettiest available Carpentries styles. Closes carpentries-incubator#138
1 parent 5519b34 commit bea5253

File tree

111 files changed

+67
-9643
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

111 files changed

+67
-9643
lines changed

.travis.yml

+7-1
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,27 @@
1-
# dist: trusty # Ubuntu 14.04
1+
# https://travis-ci.org/github/hpc-carpentry/hpc-intro
22
language: python
3+
34
python: "3.6"
5+
46
branches:
57
only:
68
- gh-pages
79
- /.*/
10+
811
before_install:
912
- sudo apt-get update -y
1013
- rvm default
1114
- gem install bundler
1215
- bundle install
16+
1317
install:
1418
- pip install pyyaml
19+
1520
script:
1621
- make lesson-check
1722
- make lesson-check-all
1823
- make --always-make site
24+
1925
jobs:
2026
include:
2127
- stage: spelling

.update-copyright.conf

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
[project]
2+
vcs: Git
3+
4+
[files]
5+
authors: yes
6+
files: no

Gemfile

+2-8
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,2 @@
1-
source "https://rubygems.org"
2-
ruby RUBY_VERSION
3-
4-
# This will help ensure the proper Jekyll version is running.
5-
gem "jekyll", ">= 3.6.3"
6-
7-
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
8-
gem "tzinfo-data", platforms: [:mingw, :mswin, :x64_mingw, :jruby]
1+
source 'https://rubygems.org'
2+
gem 'github-pages', group: :jekyll_plugins

Makefile

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33

44
# Settings
55
MAKEFILES=Makefile $(wildcard *.mk)
6-
JEKYLL=jekyll
7-
JEKYLL_VERSION=3.7.3
6+
JEKYLL=bundle exec jekyll
7+
JEKYLL_VERSION=3.8.5
88
PARSER=bin/markdown_ast.rb
99
DST=_site
1010

_config.yml

+26-41
Original file line numberDiff line numberDiff line change
@@ -59,21 +59,23 @@ workshop_interactive_queues:
5959
- testing
6060

6161
#------------------------------------------------------------
62-
# Workshop specific configuration
62+
# Values for this lesson
6363
#------------------------------------------------------------
6464

65-
# Which carpentry is this ("swc", "dc", "lc", or "cp")?
66-
# swc: Software Carpentry
67-
# dc: Data Carpentry
68-
# lc: Library Carpentry
69-
# cp: Carpentries (to use for instructor traning for instance)
65+
# Which carpentry is this?
66+
# "swc": Software Carpentry
67+
# "dc": Data Carpentry
68+
# "lc": Library Carpentry
69+
# "cp": Carpentries (e.g., instructor traning)
7070
carpentry: "swc"
7171

7272
# Overall title for pages.
7373
title: "Introduction to High-Performance Computing"
7474

75-
# Life cycle stage of the lesson
76-
# possible values: "pre-alpha", "alpha", "beta", "stable"
75+
# Email address, no mailto:
76+
77+
78+
# Life cycle stage of the lesson ("pre-alpha", "alpha", "beta", "stable")?
7779
life_cycle: "alpha"
7880

7981
#------------------------------------------------------------
@@ -83,47 +85,30 @@ life_cycle: "alpha"
8385
# What kind of thing is this ("workshop" or "lesson")?
8486
kind: "lesson"
8587

86-
# Magic to make URLs resolve both locally and on GitHub.
87-
# See https://help.github.com/articles/repository-metadata-on-github-pages/.
88-
# Please don't change it: <USERNAME>/<PROJECT> is correct.
88+
# Start time in minutes (0 to be clock-independent, 540 to show a start at 09:00 am).
89+
start_time: 0
90+
91+
# Magic to make URLs resolve both locally and on GitHub. Please don't change.
8992
repository: <USERNAME>/<PROJECT>
9093

91-
# Email address, no mailto:
92-
email: "team@carpentries.org"
94+
# Invoke the Carpentries theme rather than copying into our repository.
95+
remote_theme: carpentries/carpentries-theme
9396

9497
# Sites.
9598
amy_site: "https://amy.software-carpentry.org/workshops"
96-
carpentries_github: "https://github.com/carpentries"
97-
carpentries_pages: "https://carpentries.github.io"
98-
carpentries_site: "https://carpentries.org/"
9999
dc_site: "http://datacarpentry.org"
100-
example_repo: "https://github.com/carpentries/lesson-example"
101-
example_site: "https://carpentries.github.io/lesson-example"
102-
lc_site: "https://librarycarpentry.org/"
103100
swc_github: "https://github.com/swcarpentry"
104-
swc_pages: "https://swcarpentry.github.io"
105101
swc_site: "https://software-carpentry.org"
106-
template_repo: "https://github.com/carpentries/styles"
107-
training_site: "https://carpentries.github.io/instructor-training"
108-
workshop_repo: "https://github.com/carpentries/workshop-template"
109-
workshop_site: "https://carpentries.github.io/workshop-template"
110-
cc_by_human: "https://creativecommons.org/licenses/by/4.0/"
111-
112-
# Surveys.
113-
swc_pre_survey: "https://www.surveymonkey.com/r/swc_pre_workshop_v1?workshop_id="
114-
swc_post_survey: "https://www.surveymonkey.com/r/swc_post_workshop_v1?workshop_id="
115-
training_post_survey: "https://www.surveymonkey.com/r/post-instructor-training"
116-
dc_pre_survey: "https://www.surveymonkey.com/r/dcpreworkshopassessment?workshop_id="
117-
dc_post_survey: "https://www.surveymonkey.com/r/dcpostworkshopassessment?workshop_id="
118-
lc_pre_survey: "https://www.surveymonkey.com/r/lcpreworkshopsurvey?workshop_id="
119-
lc_post_survey: "https://www.surveymonkey.com/r/lcpostworkshopsurvey?workshop_id="
120-
instructor_pre_survey: "https://www.surveymonkey.com/r/instructor_training_pre_survey?workshop_id="
121-
instructor_post_survey: "https://www.surveymonkey.com/r/instructor_training_post_survey?workshop_id="
122-
123-
# Start time in minutes (0 to be clock-independent, 540 to show a start at 09:00 am).
124-
start_time: 0
125-
126-
# Specify that things in the episodes collection should be output.
102+
swc_pages: "https://swcarpentry.github.io"
103+
lc_site: "http://librarycarpentry.github.io/"
104+
template_repo: "https://github.com/swcarpentry/styles"
105+
example_repo: "https://github.com/swcarpentry/lesson-example"
106+
example_site: "https://swcarpentry.github.com/lesson-example"
107+
workshop_repo: "https://github.com/swcarpentry/workshop-template"
108+
workshop_site: "https://swcarpentry.github.io/workshop-template"
109+
training_site: "https://swcarpentry.github.io/instructor-training"
110+
111+
# Specify that things in the Episodes and Extras collections should be output.
127112
collections:
128113
episodes:
129114
output: true

aio.md

+8-32
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,13 @@
11
---
2+
permalink: /aio/index.html
23
---
34

4-
{% include base_path.html %}
5-
6-
<script>
7-
window.onload = function() {
8-
var lesson_episodes = [
9-
{% for episode in site.episodes %}
10-
"{{ episode.url}}"{% unless forloop.last %},{% endunless %}
11-
{% endfor %}
12-
];
13-
var xmlHttp = []; /* Required since we are going to query every episode. */
14-
for (i=0; i < lesson_episodes.length; i++) {
15-
xmlHttp[i] = new XMLHttpRequest();
16-
xmlHttp[i].episode = lesson_episodes[i]; /* To enable use this later. */
17-
xmlHttp[i].onreadystatechange = function() {
18-
if (this.readyState == 4 && this.status == 200) {
19-
var article_here = document.getElementById(this.episode);
20-
var parser = new DOMParser();
21-
var htmlDoc = parser.parseFromString(this.responseText,"text/html");
22-
var htmlDocArticle = htmlDoc.getElementsByTagName("article")[0];
23-
article_here.innerHTML = htmlDocArticle.innerHTML;
24-
}
25-
}
26-
episode_url = "{{ relative_root_path }}" + lesson_episodes[i];
27-
xmlHttp[i].open("GET", episode_url);
28-
xmlHttp[i].send(null);
29-
}
30-
}
31-
</script>
325
{% comment %}
33-
Create anchor for each one of the episodes.
6+
As a maintainer, you don't need to edit this file.
7+
If you notice that something doesn't work, please
8+
open an issue: https://github.com/carpentries/styles/issues/new
349
{% endcomment %}
35-
{% for episode in site.episodes %}
36-
<article id="{{ episode.url }}"></article>
37-
{% endfor %}
10+
11+
{% include base_path.html %}
12+
13+
{% include aio-script.md %}

0 commit comments

Comments
 (0)