Last week, the folks over at jQuery announced that they have open sourced their entire website, including content, and made it avaliable on GitHub. And even more exciting, the jQuery website now runs on WordPress!
Of course, being the creative hackers that they are, this is no ordinary WordPress install. The jQuery team sought out a way to make it easy for people to edit content without having to awkwardly access the admin panel or download the entire site for local devlopment. jQuery.com content exists in static form for the most part, in either Markdown, static HTML or XML format.
In order to maintain the site, the team built a custom WordPress multi-site configuration and used grunt to automatically pull content from any format and merge it into WordPress using the XML-RPC protocol.
That means all of the various jQuery sites (http://blog.jquery.com/, http://plugins.jquery.com/, etc.) run on a single WordPress installation, and all of its content is edited outside of the admin panel.
Not only is this one of the coolest WordPress configurations I’ve ever heard of, it also makes updating the site as simple as accepting a pull request.
Adam Sontag explains the process:
We simply use git webhooks to respond to commits on the content repositories and jquery-wp-content. Whenever a commit lands on the master branch of these repositories, the content and design is reflected immediately in the staging environment, which is just the URL of the website with a stage. subdomain prefix, e.g., stage.jquery.com.
To deploy to the production sites, all that’s necessary is tagging with a semver and pushing the tag.
Andrew Nacin (@nacin) and Daryl Koopersmith (@koop), both core WordPress developers, helped bring this massive effort to life, so congratulations guys!
Be sure to check out the full story of the git, grunt, WordPress knockout punch from the jQuery team or check out the GitHub repo and start exploring for yourself.
4 Comments