This repository holds the source for the Software Carpentry website. Home pages for bootcamps are not stored in this repository: if you want to create one, please see the instructions in the `bc repository.
Software Carpentry is an open source/open access project, and we welcome contributions of all kinds. By contributing, you are agreeing that Software Carpentry may redistribute your work under these licenses.
Software Carpentry uses a development workflow similar to that of AstroPy and many other open source projects. The AstroPy docs have excellent sections on:
This repository is roughly 145 MBytes in size
(roughly half of which is image files in the blog).
The Version 3 and Version 4 lesson materials are stored in submodules
because they are 20 and 600 MBytes respectively,
and people who only want to add blog posts don't need them.
When you clone this repository,
empty subdirectories called v3
and v4
are created to hold the submodules.
You do not need to git update
these in order to build the miscellaneous pages and blog,
though the links in _site/*
to these files won't resolve properly if they are not present.
Building the website requires Jekyll, which we use to compile templated HTML pages, and Python, which we use for pre- and post-processing. We use Jekyll because it's what GitHub uses; we use Python because most of our volunteers speak it.
- Type
make
to see a list of all available commands. - Type
make check
to build everything in_site
for testing. (Depending on your machine, this takes about 10-15 seconds.)
We try to use the same MarkDown interpreters as GitHub does for consistency. On OS X, we suggest you use a recent Ruby to get access to these. If you don't have Homebrew or MacPorts installed, here's a quick recipe to get started using HomeBrew.
ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go)"
brew install ruby
gem install jekyll
gem install redcarpet
To create a new blog post:
- Fork this repository on GitHub, and clone that to your desktop.
- Create a file
blog/YYYY/MM/post-name.html
, whereYYYY
is a four-digit year andMM
is a two-digit month. - Fill in the metadata at the top of the file:
layout
must beblog
.author
must be the author's name. (It does not need to be quoted.)title
is the post title.date
the date of the post (in YYYY-MM-DD format).time
must be an HH:MM:TT clock time. Use 09:00:00 for the first post on a particular day, 10:00:00 for the second, and so on, so that posts can be ordered.category
must be a list of category identifiers, e.g.,["Euphoric State University", "Assessment"] You can run the command
make categories` to get a list of existing category names.
- Use HTML to write the post.
- Use
<!-- start excerpt -->
and<!-- end excerpt -->
to mark a paragraph or two at the start as the excerpt to show in feed readers. - If you need to refer to our email address, it is
{{page.contact}}
. - If you need to another post, or something else on the site, use
{{page.root}}/path/to/file
. - We also provide
{{site.site}}
(the base URL for the site),{{site.twitter_name}}
,{{site.twitter_url}}
,{{site.facebook_url}}
,{{site.google_plus_url}}
, and{{site.rss_url}}
(all of which should be self-explanatory).
- Use
- Please add any images your blog post needs to the same blog/YYYY/MM directory as the post itself. Please use lower-case names without special characters for image files.
make
in the root directory will list available commands;make check
will rebuild the web site in the_site
directory. Open_site/index.html
to see your post on the blog's home page,_site/blog/index.html
to see it on the blog home page, and_site/YYYY/MM/post-name.html
to see the post itself.- When you're satisfied with your post,
git add path/to/post
andgit commit -m "Adding a blog post about something or other"
will commit it to your local copy (on your laptop). git push origin master
will push it to your clone on GitHub (assuming you've added your fork on GitHub as a remote calledorigin
).- Go to GitHub and issue a pull request from your clone to
swcarpentry/website
, then assign it to@gvwilson
or@amyrbrown
for proof-reading.
The images used in this site are divided between the img
and assets
directories.
The former is a duplicate of the bc
repository's img
directory,
while the latter contains files that are only used in the website.
The img
files are duplicated because the alternatives are all complicated:
- We want to keep the
bc
module (which instructors use as a starting point for bootcamp home pages) as simple as possible, which rules out a submodule for images. - Clever tricks with symbolic links proved fragile in practice,
and meant that include files in the
bc
andsite
repositories had to use different paths to refer to shared images.
In addition:
- The
css
andjs
directories inbc
andsite
are duplicates, for the same reasons given above. - Some of the material in the
_includes
directory is duplicated in thebootcamp
template repository, but only some. - We generate our own RSS feed (in
feed.xml
) and blog home page because Jekyll insists on using_posts/YYYY-MM-DD-name.html
, and we don't want to have hundreds of files in one directory. - Bootcamp pages for old bootcamps
are stored in the
bootcamps
directory of this repository, since there's little point in creating repos for them. New bootcamps should be created using the process described earlier.