Code 52 - a new coding project every week

Contribute to the project websites

You may have noticed that we have pages for each of the individual projects. In truth, we have sub-websites that anybody can edit with a pull request.

GitHub Pages (GH-Pages)

Any GitHub repository with a "gh-pages" branch has a website, usually in the form of username.github.com/projectname. In our case, as Code52 is the "organisation" that has all the repos under it, it'd be code52.github.com.

What if we wanted a 'root' website (username.github.com) rather than sub-projects? Easy. Create a new repo on GitHub named "yourname.github.com". For Code52, that's code52.github.com.

There are some neat tricks you can do to make that one of your own domains. If a repo has a CNAME file (see our example) GitHub sets the canonical url to the value in that file. That can be done on individual projects, but we've done it on the "root" gh-pages for Code52, so all projects gh-pages appear as code52.org/<projectname>/

Jekyll

So far we've just been modifying the gh-pages template (you can either create a gh-pages repo manually or click a button and GitHub creates a page from a template, giving you basic project info), but all gh-pages can be processed using Jekyll.

Jekyll is a static website generator which is "blog aware" and processes Markdown and turns it into HTML. I won't go into a long detailed explaination about how Jekyll is awesome - but gh-pages can either be 'plain' HTML or templated Jekyll/markdown which gives a fair degree of flexibility. The entire Code52 website is hosted off GitHub using Jekyll, so if you're unsure, check that out and ask questions.

If you're looking for an editor for markdown, we recommend one of our own.

Fork, send a pull request, deploy

If you think we're doing something wrong on any of the Code52 websites - or you just want to add something missing, fork either the main website or an individual project, checkout the gh-pages branch, and send a pull request when you're done!

blog comments powered by Disqus