Skip to content

Commit 56852e2

Browse files
Merge branch 'gh-pages' into patch-9
2 parents 84ddf84 + c0394b4 commit 56852e2

50 files changed

Lines changed: 1363 additions & 889 deletions

Some content is hidden

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

.github/FUNDING.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
github: [carpentries, swcarpentry, datacarpentry, librarycarpentry]
2+
custom: ["https://carpentries.wedid.it"]

.github/ISSUE_TEMPLATE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@ Thanks for contributing! If this contribution is for instructor training, please
66

77
If this issue is about a specific episode within a lesson, please provide its link or filename.
88

9-
Please keep in mind that lesson maintainers are volunteers and it may be some time before they can respond to your contribution. Although not all contributions can be incorporated into the lesson materials, we appreciate your time and effort to improve the curriculum. If you have any questions about the lesson maintenance process or would like to volunteer your time as a contribution reviewer, please contact Kate Hertweck (k8hertweck@gmail.com).
9+
Please keep in mind that lesson maintainers are volunteers and it may be some time before they can respond to your contribution. Although not all contributions can be incorporated into the lesson materials, we appreciate your time and effort to improve the curriculum. If you have any questions about the lesson maintenance process or would like to volunteer your time as a contribution reviewer, please contact The Carpentries Team at team@carpentries.org.
1010

1111
---

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@ Please delete this line and the text below before submitting your contribution.
44

55
Thanks for contributing! If this contribution is for instructor training, please send an email to checkout@carpentries.org with a link to this contribution so we can record your progress. You’ve completed your contribution step for instructor checkout just by submitting this contribution.
66

7-
Please keep in mind that lesson maintainers are volunteers and it may be some time before they can respond to your contribution. Although not all contributions can be incorporated into the lesson materials, we appreciate your time and effort to improve the curriculum. If you have any questions about the lesson maintenance process or would like to volunteer your time as a contribution reviewer, please contact Kate Hertweck (k8hertweck@gmail.com).
7+
Please keep in mind that lesson maintainers are volunteers and it may be some time before they can respond to your contribution. Although not all contributions can be incorporated into the lesson materials, we appreciate your time and effort to improve the curriculum. If you have any questions about the lesson maintenance process or would like to volunteer your time as a contribution reviewer, please contact The Carpentries Team at team@carpentries.org.
88

99
---

.gitignore

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,13 @@
33
.DS_Store
44
.ipynb_checkpoints
55
.sass-cache
6+
.jekyll-cache/
67
__pycache__
78
_site
89
.Rproj.user
910
.Rhistory
1011
.RData
11-
12+
.bundle/
13+
.vendor/
14+
.docker-vendor/
15+
Gemfile.lock

CITATION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
Please cite as:
22

33
Greg Wilson (ed): "Software Carpentry: Workshop Template." Version
4-
2016.06, June 2016, https://github.com/swcarpentry/workshop-template,
4+
2016.06, June 2016, https://github.com/carpentries/workshop-template,
55
10.5281/zenodo.58156.

Gemfile

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# frozen_string_literal: true
2+
3+
source 'https://rubygems.org'
4+
5+
git_source(:github) {|repo_name| "https://github.com/#{repo_name}" }
6+
7+
# Synchronize with https://pages.github.com/versions
8+
ruby '>=2.5.3'
9+
10+
gem 'github-pages', group: :jekyll_plugins

Makefile

Lines changed: 72 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,70 @@
1+
# Use /bin/bash instead of /bin/sh
2+
export SHELL = /bin/bash
3+
14
## ========================================
25
## Commands for both workshop and lesson websites.
36

47
# Settings
58
MAKEFILES=Makefile $(wildcard *.mk)
6-
JEKYLL=jekyll
7-
JEKYLL_VERSION=3.7.3
9+
JEKYLL_VERSION=3.8.5
10+
JEKYLL=bundle install --path .vendor/bundle && bundle update && bundle exec jekyll
811
PARSER=bin/markdown_ast.rb
912
DST=_site
1013

14+
# Check Python 3 is installed and determine if it's called via python3 or python
15+
# (https://stackoverflow.com/a/4933395)
16+
PYTHON3_EXE := $(shell which python3 2>/dev/null)
17+
ifneq (, $(PYTHON3_EXE))
18+
ifeq (,$(findstring Microsoft/WindowsApps/python3,$(subst \,/,$(PYTHON3_EXE))))
19+
PYTHON := python3
20+
endif
21+
endif
22+
23+
ifeq (,$(PYTHON))
24+
PYTHON_EXE := $(shell which python 2>/dev/null)
25+
ifneq (, $(PYTHON_EXE))
26+
PYTHON_VERSION_FULL := $(wordlist 2,4,$(subst ., ,$(shell python --version 2>&1)))
27+
PYTHON_VERSION_MAJOR := $(word 1,${PYTHON_VERSION_FULL})
28+
ifneq (3, ${PYTHON_VERSION_MAJOR})
29+
$(error "Your system does not appear to have Python 3 installed.")
30+
endif
31+
PYTHON := python
32+
else
33+
$(error "Your system does not appear to have any Python installed.")
34+
endif
35+
endif
36+
37+
1138
# Controls
1239
.PHONY : commands clean files
13-
.NOTPARALLEL:
14-
all : commands
1540

16-
## commands : show all commands.
17-
commands :
18-
@grep -h -E '^##' ${MAKEFILES} | sed -e 's/## //g'
41+
# Default target
42+
.DEFAULT_GOAL := commands
1943

20-
## docker-serve : use docker to build the site
21-
docker-serve :
22-
docker run --rm -it -v ${PWD}:/srv/jekyll -p 127.0.0.1:4000:4000 jekyll/jekyll:${JEKYLL_VERSION} make serve
44+
## I. Commands for both workshop and lesson websites
45+
## =================================================
2346

24-
## serve : run a local server.
47+
## * serve : render website and run a local server
2548
serve : lesson-md
2649
${JEKYLL} serve
2750

28-
## site : build files but do not run a server.
51+
## * site : build website but do not run a server
2952
site : lesson-md
3053
${JEKYLL} build
3154

32-
# repo-check : check repository settings.
55+
## * docker-serve : use Docker to serve the site
56+
docker-serve :
57+
docker run --rm -it --volume ${PWD}:/srv/jekyll \
58+
--volume=${PWD}/.docker-vendor/bundle:/usr/local/bundle \
59+
-p 127.0.0.1:4000:4000 \
60+
jekyll/jekyll:${JEKYLL_VERSION} \
61+
bin/run-make-docker-serve.sh
62+
63+
## * repo-check : check repository settings
3364
repo-check :
34-
@bin/repo_check.py -s .
65+
@${PYTHON} bin/repo_check.py -s .
3566

36-
## clean : clean up junk files.
67+
## * clean : clean up junk files
3768
clean :
3869
@rm -rf ${DST}
3970
@rm -rf .sass-cache
@@ -42,22 +73,26 @@ clean :
4273
@find . -name '*~' -exec rm {} \;
4374
@find . -name '*.pyc' -exec rm {} \;
4475

45-
## clean-rmd : clean intermediate R files (that need to be committed to the repo).
76+
## * clean-rmd : clean intermediate R files (that need to be committed to the repo)
4677
clean-rmd :
4778
@rm -rf ${RMD_DST}
4879
@rm -rf fig/rmd-*
4980

50-
## ----------------------------------------
51-
## Commands specific to workshop websites.
81+
82+
##
83+
## II. Commands specific to workshop websites
84+
## =================================================
5285

5386
.PHONY : workshop-check
5487

55-
## workshop-check : check workshop homepage.
88+
## * workshop-check : check workshop homepage
5689
workshop-check :
57-
@bin/workshop_check.py .
90+
@${PYTHON} bin/workshop_check.py .
5891

59-
## ----------------------------------------
60-
## Commands specific to lesson websites.
92+
93+
##
94+
## III. Commands specific to lesson websites
95+
## =================================================
6196

6297
.PHONY : lesson-check lesson-md lesson-files lesson-fixme
6398

@@ -85,37 +120,39 @@ HTML_DST = \
85120
$(patsubst _extras/%.md,${DST}/%/index.html,$(sort $(wildcard _extras/*.md))) \
86121
${DST}/license/index.html
87122

88-
## lesson-md : convert Rmarkdown files to markdown
123+
## * lesson-md : convert Rmarkdown files to markdown
89124
lesson-md : ${RMD_DST}
90125

91126
_episodes/%.md: _episodes_rmd/%.Rmd
92127
@bin/knit_lessons.sh $< $@
93128

94-
## lesson-check : validate lesson Markdown.
129+
# * lesson-check : validate lesson Markdown
95130
lesson-check : lesson-fixme
96-
@bin/lesson_check.py -s . -p ${PARSER} -r _includes/links.md
131+
@${PYTHON} bin/lesson_check.py -s . -p ${PARSER} -r _includes/links.md
97132

98-
## lesson-check-all : validate lesson Markdown, checking line lengths and trailing whitespace.
133+
## * lesson-check-all : validate lesson Markdown, checking line lengths and trailing whitespace
99134
lesson-check-all :
100-
@bin/lesson_check.py -s . -p ${PARSER} -r _includes/links.md -l -w --permissive
135+
@${PYTHON} bin/lesson_check.py -s . -p ${PARSER} -r _includes/links.md -l -w --permissive
101136

102-
## unittest : run unit tests on checking tools.
137+
## * unittest : run unit tests on checking tools
103138
unittest :
104-
@bin/test_lesson_check.py
139+
@${PYTHON} bin/test_lesson_check.py
105140

106-
## lesson-files : show expected names of generated files for debugging.
141+
## * lesson-files : show expected names of generated files for debugging
107142
lesson-files :
108143
@echo 'RMD_SRC:' ${RMD_SRC}
109144
@echo 'RMD_DST:' ${RMD_DST}
110145
@echo 'MARKDOWN_SRC:' ${MARKDOWN_SRC}
111146
@echo 'HTML_DST:' ${HTML_DST}
112147

113-
## lesson-fixme : show FIXME markers embedded in source files.
148+
## * lesson-fixme : show FIXME markers embedded in source files
114149
lesson-fixme :
115150
@fgrep -i -n FIXME ${MARKDOWN_SRC} || true
116151

117-
#-------------------------------------------------------------------------------
118-
# Include extra commands if available.
119-
#-------------------------------------------------------------------------------
152+
##
153+
## IV. Auxililary (plumbing) commands
154+
## =================================================
120155

121-
-include commands.mk
156+
## * commands : show all commands.
157+
commands :
158+
@sed -n -e '/^##/s|^##[[:space:]]*||p' $(MAKEFILE_LIST)

README.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,11 @@ for your learners to practice in.
3232
(If you do not have an account, you can quickly create one for free.)
3333
You must be logged in for the remaining steps to work.
3434

35-
2. Go to <a href="https://github.com/new/import" target="_blank">GitHub's importer</a>.
35+
2. Go to <a href="https://github.com/new/import" target="_blank">GitHub's
36+
importer</a>. Note that you do not want to create a fork because any
37+
particular user can only have one fork of a repository. Instructors
38+
frequently teach more than one workshop and therefore need multiple copies
39+
of the repository.
3640

3741
3. Paste the url of this repo as the old repository to clone:
3842
<https://github.com/carpentries/workshop-template>.
@@ -251,10 +255,10 @@ please [file an issue][issues]
251255
or [mail us][email].
252256
253257
[email]: mailto:team@carpentries.org
254-
[customization]: https://carpentries.github.io/workshop-template/customization/
258+
[customization]: https://carpentries.github.io/workshop-template/customization/index.html
255259
[dc-site]: http://datacarpentry.org
256260
[design]: https://carpentries.github.io/workshop-template/design/
257-
[faq]: https://carpentries.github.io/workshop-template/faq/
261+
[faq]: https://carpentries.github.io/workshop-template/faq/index.html
258262
[github-project-pages]: https://help.github.com/en/github/working-with-github-pages/creating-a-github-pages-site
259263
[importer]: https://github.com/new/import
260264
[issues]: https://github.com/carpentries/workshop-template/issues

_extras/customization.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
layout: page
33
title: Customizing Your Workshop's Website
4-
permalink: /customization/
4+
permalink: /customization/index.html
55
---
66
## Configuration File `_config.yml`
77

_extras/faq.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
layout: page
33
title: FAQ
4-
permalink: /faq/
4+
permalink: /faq/index.html
55
---
66

77
## General

0 commit comments

Comments
 (0)