- 3/13/2019 this ReadMe edited to refect how to customize a UCSB workshop
- if you cloned this existing Python workshop from a previous UCSB repo
This repository is based on The Carpentries' (Software Carpentry, Data Carpentry, and Library Carpentry's) template for creating websites for workshops. Cloned from there March, 2019
It might be good form to strikethrough the parts of these customizations that you have completed.
If you run into problems, or have ideas about how to make this process simpler, please get in touch. The pages on customizing your website, the FAQ, and the design notes have more detail on what we do and why. And please note: if you are teaching Git, please create a separate repository for your learners to practice in.
-
At this point, you should have a page like this:
You can now click "Begin Import". When the process is done, you will receive a message like "Importing complete! Your new repository jules32/2015-07-01-miskatonic is ready." and you can go to the new repository by clicking on the name.
Note: some people have had intermittent errors during the import process, possibly because of the network timing out. If you experience a problem, please re-try; if the problem persists, please get in touch.
-
Go into your newly-created repository, which will be at
https://github.com/UCSBCarpentry/YYYY-MM-DD-site
. For example, if your username isgvwilson
, the repository's URL will behttps://github.com/gvwilson/2016-12-01-miskatonic
. -
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. -
Edit
_config.yml
to customize certain site-wide variables, such as:carpentry
(to tell us which carpentry workshop this is),title
(overall title for all pages),workshop_repo
(the URL of the workshop repository on GitHub) andworkshop_site
(the repository's GitHub Pages URL).Editing hints are embedded in
_config.yml
, and full instructions are in the customization instructions. -
Edit the
schedule.html
file to edit the schedule for your upcoming workshop. This file is located in the_includes
directory, make sure to choose the one from the appropriatedc
(Data Carpentry workshop),lc
(Library Carpentry), orsc
(Software Carpentry) subdirectory.
At about this point, please also let Carpentries know the workshop URL. If this is a self-organised workshop (which it most likely is), you should also fill in the self-organized workshop form (if you have not already done so), so we can keep track of all workshops. We build the list of workshops on our websites from the data included in your index.md
page. We can only do that if you customize that page correctly and let us know the workshop URL.
-
Alternatively, you can be jaunty and do this from Git at the command line, you can clone the repository to your desktop, edit
index.md
,_config.yml
, andschedule.html
there, and push your changes back to the repository.git clone -b gh-pages https://github.com/your_username/YYYY-MM-DD-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
-
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-miskatonic
. 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 workshop 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). -
Unless we're missing something, moving episodes into the Workshop is a pretty manual process. Also, you either need to segregate each episode into subdirectories, or else pre-pend a number to the filenames to make the forward arrows work.
Prepend like this:
for f in *.md; do mv "$f" "1$f"; done;
1, 2, and 3 work better than starting with 0.
Note:
please do all of your work in your repository's gh-pages
branch,
since GitHub automatically publishes that as a website.
Note: this template includes some files and directories that most workshops do not need, but which provide a standard place to put extra content if desired. See the design notes for more information about these.
Further instructions are available in the customization instructions. This FAQ includes a few extra tips (additions are always welcome) and these notes on the background and design of this template may help as well.
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
(assuming 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., "Miskatonic University workshop, Dec. 2016")
-
The URL for your workshop in the "Website" box (e.g.,
https://gvwilson.github.io/2016-12-01-miskatonic
)
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 either "dc" (for Data Carpentry), "swc" (for Software Carpentry), or "lc" (for Library Carpentry). This determines which logos are loaded. -
title
is the title of your workshop (typically the venue and date). -
email
is the contact email address for your workshop, e.g.,gvwilson@miskatonic.edu
.
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
.
If you are teaching Git, you should create a separate repository for learners to use in that lesson. You should not have them use the workshop website repository because:
-
your workshop website repository contains many files that most learners don't need to see during the lesson, and
-
you probably don't want to accidentally merge a damaging pull request from a novice Git user into your workshop's website while you are using it to teach.
You can call this repository whatever you like, and add whatever content you need to it.
We are committed to offering a pleasant setup experience for our learners and organizers. If you find bugs in our instructions, or would like to suggest improvements, please file an issue or mail us.