GitHub Pages that don't depend on JavaScript

By Alex Muller

There’s a blog post that explains how to use GitHub Pages metadata to display a list of repositories. It’s great because it’s one of the only uses of site.github.public_repositories that I can find online. But part way through it says:

I needed to get the metadata into JavaScript

Both the Shopify and Yahoo! GitHub Pages instances use that technique, and as a result if you load those pages without JavaScript you’ll get something that looks a bit broken.

We’re using the same metadata for GOV.UK’s GitHub Pages. I’d bet our repository hasn’t had as much work go into it as those other two, but our text is right in the HTML, so the page works if the JavaScript fails to execute.

At the Government Digital Service we try and build things that are as resilient to failure as possible. alphagov.github.io is quite possibly the least important thing we do, but it feels nice to create web things in the best way that we can all the time.

GDS has jobs currently available for developers and junior developers, so if this sounds like the way you work make sure you apply.


Written on Saturday 29 November, 2014