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. Please see this page for a list of contributors to date.
Software Carpentry uses a development workflow similar to that of AstroPy and many other open source projects. The AstroPy docs have excellent sections on:
To create a new blog post, here is what you do:
- Fork swcarpentry/website on GitHub.
- Clone that to your desktop.
- Download additional dependencies, using 'git submodule init' and 'git submodule update'.
- In the root directory, run 'make blog-next-id' to find out what ID number your blog post should have. (This will eventually be automated.)
- Create a file called blog/YYYY/MM/some-descriptive-title.html (where 'YYYY' is the four-digit year and 'MM' is the two-digit month, but you knew that). Alternatively, copy blog/YYYY/MM/something-or-other.html to create the file you want.
- Edit the metadata at the top of the file:
- "post_id" is whatever step 3 returned
- "author_id" must be one of the short strings from blog/metadata.json. If the person supposedly authoring the post isn't in that file, add 'em.
- "title" is the post title. It can't contain special characters right now (will be fixed).
- "post_date" is self-explanatory.
- There can be any number of "category" meta's. The values must be taken from the second half of blog/metadata.json (again, if you need a new category, add it).
- Put HTML between the {% block content %} and {% endblock content %} markers.
- If you need to refer to our email address, it is {{contact_email}} (double curlies).
- If you need to refer to a file, use {{root_path}}/path/to/file.
- We also provide {{site}} (the base URL for the site), {{twitter_name}}, and {{twitter_url}} (hopefully self-explanatory.
- I'll add {{facebook_url}} if someone can remind me what it is.
- If you're attaching a file, put the file in files/YYYY/MM/some-name-or-other, and refer to it as {{root_path}}/files/YYYY/MM/some-name-or-other
- 'make check' in the root directory to create build/*.html (to make sure all the HTML validates, all the file paths resolve, etc.).
- Open build/blog/index.html or build/blog/YYYY/MM/some-descriptive-title.html to eyeball your creation.
- When you're satisfied, 'git add blog/YYYY/MM/some-descriptive-title.html' (not build/anything, ever). Also 'git add' any extra files you've created (attachments).
- 'git 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 configured 'origin' to mean "my fork on GitHub").
- Go to GitHub and issue a pull request from your clone to swcarpentry/website, then assign it to @gvwilson or @pipitone for proof-reading.