This repository is The Carpentries' template for creating websites for Instructor Training workshops.
-
Please do not fork this repository directly on GitHub. Instead, please use the instructions below to copy this
training-template
repository and customize it for your workshop. -
Customise the values in
_config.yml
and the header ofindex.md
(orindex.md.cldt
for Collaborative Lesson Development Training) to configure the website for your training event. Please do your work in your repository'sgh-pages
branch, since that is what is automatically published as a website by GitHub. -
(Collaborative Lesson Development Training events only) Rename
index.md.cldt
toindex.md
(replacing the originalindex.md
) to use this file as the source of the training event page. -
Once you are done, please send your repository's URL to The Carpentries contact]. For an Instructor Training event send the URL to [email protected]. For Collaborative Lesson Development Training, send to [email protected].
If you run into problems, or have ideas about how to make this process simpler, please get in touch. The section on customizing your website, and the FAQ and design notes from the related template for workshop websites have more detail on what we do and why.
-
Log in to GitHub. (If you do not have an account, you can quickly create one for free.) You must be logged in for the remaining steps to work.
-
On this page (https://github.com/carpentries/training-template), click on the green "Use this template" button (top right)
-
Select the owner for your new repository. (This will probably be you, but may instead be an organization you belong to.)
-
Choose a name for your workshop website repository. For Instructor Training, this name should have the form
YYYY-MM-DD-ttt-site
, e.g.,2016-12-01-ttt-oomza
, whereYYYY-MM-DD
is the start date of the training. For Collaborative Lesson Development Training, the name should have the formYYYY-MM-DD-cldt-partN-site
, whereYYYY-MM-DD
is the start date of the training andN
is a number indicating the part of the training (1 or 2) that will be taught at this event. For online workshops, chooseonline
assite
. In most cases, the Instructor Training Team will tell you the name of the repository you should use. -
Make sure the repository is public, leave "Include all branches" unchecked, and click on "Create repository from template". You will be redirected to your new copy of the workshop template respository.
-
With a repository called
YYYY-MM-DD-ttt-site
, your new website will be rendered athttps://your_username.github.io/YYYY-MM-DD-ttt-site
.
(For Collaborative Lesson Development Training, follow the steps described here
but modify the index.md.cldt
file instead.)
-
Go into your newly-created repository, which will be at
https://github.com/your_username/YYYY-MM-DD-ttt-site
. For example, if your username isgvwilson
, the repository's URL will behttps://github.com/gvwilson/2016-12-01-ttt-oomza
. -
Ensure you are on the gh-pages branch by clicking on the branch under the drop down in the menu bar (see the note below):
-
Edit the header of
index.md
to customize the list of instructors, workshop venue, etc. You can do this in the browser by clicking on it in the file view on GitHub and then selecting the pencil icon in the menu bar:Editing hints are embedded in
index.md
, and full instructions are in the customization instructions. -
Alternatively, if you are already familiar with Git, you can clone the repository to your desktop, and edit
index.md
there, and push your changes back to the repository.git clone https://github.com/your_username/YYYY-MM-DD-ttt-site
You should specify
-b gh-pages
to checkout the gh-pages branch because the imported repository doesn't have amaster
branch.In order to view your changes once you are done editing, you must push to your GitHub repository:
git push origin gh-pages
-
(Collaborative Lesson Development Training events only) Rename
index.md.cldt
toindex.md
(replacing the originalindex.md
) to use this file as the source of the training event page. If you are working locally, this can be achieved with the commandgit mv index.md.cldt index.md
. -
When you are done editing, go to the GitHub Pages URL for your workshop and preview your changes. In the example above, this is
https://gvwilson.github.io/2016-12-01-ttt-oomza
. The finished page should look something like this. -
Optional: you can now change the
README.md
file in your website's repository, which contains these instructions, so that it contains a short description of your workshop and a link to the training website. -
Optional: Add a link to your workshop website on the repository main page in the description/website section (look for the
Edit
button on the right to add).
Note:
please do all of your work in your repository's gh-pages
branch,
since GitHub automatically publishes that as a website.
If you want to preview your changes on your own machine before publishing them on GitHub, you can do so as described below.
-
Install the software described below. This may require some work, so feel free to preview by pushing to the website.
-
Run the command
make serve
and go to http://0.0.0.0:4000 to preview your site. You can also run this command by typing
make serve
(if you have Make installed). -
Run the command
make workshop-check
to check for a few common errors in your workshop's home page. (You must have Python 3 installed to do this.)
At the top of your repository on GitHub you'll see
No description, website, or topics provided. — Edit
Click 'Edit' and add:
-
A very brief description of your workshop in the "Description" box (e.g., "Oomza University workshop, Dec. 2016")
-
The URL for your workshop in the "Website" box (e.g.,
https://gvwilson.github.io/2016-12-01-ttt-oomza
)
This will help people find your website if they come to your repository's home page.
In rare cases,
you may want to add extra pages to your workshop website.
You can do this by putting either Markdown or HTML pages in the website's root directory
and styling them according to the instructions give in
the lesson template.
If you do this,
you must also edit _config.yml
to set these three values:
-
carpentry
is "cp" (for The Carpentries). This determines which logo is loaded. -
title
is the title of your workshop (typically the venue and date).
Note: carpentry
and email
duplicate information that's in index.md
,
but there is no way to avoid this
without requiring people to edit both files in the usual case
where no extra pages are created.
If you want to set up Jekyll so that you can preview changes on your own machine before pushing them to GitHub, you must install the software described below. (Note: Julian Thilo has written instructions for installing Jekyll on Windows.)
-
Ruby. This is included with Linux and macOS; the simplest option on Windows is to use RubyInstaller. You can test your installation by running
ruby --version
. For more information, see the Ruby installation guidelines. -
RubyGems (the package manager for Ruby). You can test your installation by running
gem --version
. -
Jekyll. You can install this by running
gem install jekyll
.
You can check the formatting of your header by running bin/workshop_check.py
(which is invoked by make workshop-check
).
You must have Python 3 installed in order to do this,
and you will also need the PyYAML module.
We are committed to offering a pleasant setup experience for our learners, Trainers, Instructors and workshop hosts. If you find bugs in our instructions, or would like to suggest improvements, please file an issue or mail us.