Get AI summaries of any video or article — Sign up free
Jen Lambourne - The UK government meets docs as code thumbnail

Jen Lambourne - The UK government meets docs as code

Write the Docs·
6 min read

Based on Write the Docs's video on YouTube. If you like this content, support the original creators by watching, liking and subscribing to their content.

TL;DR

GDS adopted docs as code after user research showed documentation was inconsistent, hard to find, and out of sync with agile product delivery.

Briefing

The UK government’s Government Digital Service (GDS) turned technical documentation into “docs as code,” but the real breakthrough wasn’t the tooling—it was the sequence of decisions that made documentation easier to find, easier to update, and cheaper to support. After years of inconsistent docs scattered across PDFs, emails, and multiple locations, GDS used software-development workflows (version control, pull requests, automated builds) to bring documentation under the same discipline as the products it describes. The payoff: users found answers faster, support tickets dropped, and developers could contribute without being blocked by proprietary publishing setups.

The journey began with hard user research showing documentation performance was “extremely poor”: content was inconsistent, hard to locate, sometimes not published online at all, and difficult for technical writers and developers to keep synchronized with agile product changes. With technical writing still new inside GDS, teams were also wasting time training each other on different tools. Developers wanted to help improve docs, but their contributions were trapped behind closed or fragmented systems—like proprietary tools, isolated repositories, or PDFs with no single source of truth.

A first attempt at docs as code started small, then faced the reality of government scale and constraints. Hiring was frozen, so GDS leaned on the broader developer community for help—using informal incentives and strong demand from people who had felt the pain firsthand. A business case then had to justify where the work would live. GDS ultimately assigned the effort to a team without external-facing docs, because that team was building a cross-government design system and needed documentation that could fit across products rather than be tailored per service.

Tooling decisions followed. GDS chose GitHub for repository hosting (matching how developers already worked) and organized docs under an open GitHub organization called alpha gov. For static site generation, the team initially considered popular options like Jekyll and Hugo, but switched away from Hugo due to limited Go expertise and the need for maintainable extensibility. They selected Middleman (Ruby-based) instead, leveraging GDS’s Ruby experience and templating needs.

Content architecture then became the next major fork. User research for API documentation pushed GDS toward a single-page reference layout—optimized for Ctrl+F—while other information (like authentication and support) still required different placement once multi-page navigation became necessary. GDS also split repositories: internal-facing docs lived alongside product code, while end-user docs moved into separate repositories to simplify findability and access control.

The team hit another wall when legacy documentation written in reStructuredText proved too complex to convert cleanly. Rather than forcing tooling to compensate, GDS treated the problem as a content issue—simplifying and rewriting bloated, outdated material in plain English before converting it to Markdown. Deployment started manually (a short-term compromise) but the long-term goal remained automation through continuous integration and deployment.

As contributions scaled, GDS added governance: pull requests required specific reviewers, technical writers or lead developers had to approve changes, and GitHub labels indicated the review path. Slack-based nudging followed, including an automated “nag” bot to keep documentation reviews moving.

Later, accessibility regulations arriving in September 2019 forced urgent template updates with weeks to implement—while half the technical writing team was in Prague. With no time and no cash, GDS again turned to developer support, using developers’ protected time (20% time) to keep the documentation system compliant.

By the end, GDS reported measurable benefits: happier users who could find information more easily, reduced support costs and tickets, and developers who could contribute faster—freeing them to focus on writing and improving docs rather than wrestling with tooling and training. The overall lesson was that docs as code is a long chain of interlocking choices, and success depends on aligning tooling, content, workflow, and review culture—not just adopting a static site generator or a repository format.

Cornell Notes

GDS’s docs-as-code effort in the UK government started after user research showed documentation was inconsistent, hard to find, and out of sync with agile product development. With hiring frozen, the team relied on developers to help build the workflow: GitHub-hosted repositories, automated builds, and pull-request-based review with required technical writer or lead developer approvals. Middleman was chosen as the static site generator after reconsidering Hugo and Jekyll, mainly for maintainability and templating needs. Content strategy mattered as much as tooling—legacy reStructuredText docs were rewritten and simplified before converting to Markdown. The result was improved findability, lower support ticket volume, and faster developer contributions, with ongoing work driven by accessibility requirements and search improvements.

What problem pushed GDS toward docs as code, and what did “poor documentation” look like in practice?

User research found GDS documentation was “extremely poor”: content was inconsistent across locations, sometimes not published online at all, and often ended up as PDFs attached to emails. Technical writers struggled to find what they needed, and new technical writers had to train repeatedly on different toolchains. Because docs weren’t kept in sync with agile product changes, GDS spent too much on support for basic questions and developers couldn’t contribute easily when docs lived in proprietary or fragmented systems.

Why did GDS treat docs as code as a workflow and governance problem—not just a publishing change?

Docs as code required aligning documentation with software development practices: version control, pull requests, and review gates. GDS added rules so PRs needed a set number of reviewers and required approval from a technical writer or lead developer before merging. They also used labels on GitHub PRs to indicate the review type and used Slack-based “nagging” (via a documentation review bot) to keep reviews from stalling.

How did GDS decide where documentation should live relative to product code?

GDS used a split approach. Internal-facing documentation was stored with the product code to match how product teams maintained their services. End-user documentation moved into separate repositories to improve findability across many microservices and to simplify access control—e.g., keeping some content fully open while introducing limited approvals for other areas.

What static site generator choices did GDS make, and what drove the final selection?

GDS considered Jekyll and Hugo, but Hugo was rejected because it’s written in Go and GDS lacked Go experience at the time, plus the team expected to build or customize extensions. After re-evaluating based on community maturity, release cadence, and plugin needs, GDS selected Middleman (Ruby-based) because GDS had Ruby experience and Middleman’s templating capabilities fit their requirements.

Why did legacy documentation conversion fail when it was treated as a tooling problem?

Legacy docs were written in reStructuredText with heavy reuse and cross-referencing, and they were also wildly out of date. Automated conversion using tools like Pandoc produced bad output and created messy reuse structures, consuming time to “fix the mess” rather than improving user outcomes. GDS concluded it was fundamentally a content problem, so they rewrote and simplified the material in plain English before converting it to Markdown and feeding it into the new docs workflow.

How did accessibility regulation change the project timeline and resourcing?

In September 2019, new UK public-sector accessibility regulations required updates to focus states and contrast requirements. The documentation template needed a major update, but GDS had only weeks to implement it while half the technical writers were in Prague. With no time and no cash, GDS again leaned on developer support, using developers’ 20% time to complete the template and compliance work.

Review Questions

  1. Which specific documentation failures (format, location, and maintenance) did user research identify before docs as code was adopted?
  2. What review and automation mechanisms did GDS add to scale contributions safely, and why were they necessary?
  3. How did GDS’s approach to legacy reStructuredText docs demonstrate a shift from tooling fixes to content fixes?

Key Points

  1. 1

    GDS adopted docs as code after user research showed documentation was inconsistent, hard to find, and out of sync with agile product delivery.

  2. 2

    Hiring constraints forced GDS to build momentum by mobilizing developers to contribute to documentation workflows and tooling.

  3. 3

    Repository and workflow design mattered: GitHub hosting under alpha gov, pull-request review gates, and required approvals helped scale safely.

  4. 4

    Static site generator selection balanced popularity with maintainability and extensibility; Middleman won over Hugo and Jekyll due to GDS’s Ruby experience and templating needs.

  5. 5

    Content strategy was decisive: legacy reStructuredText docs were rewritten and simplified before converting to Markdown, because conversion alone produced unusable results.

  6. 6

    GDS used both technical and social automation—GitHub labels, required reviewers, and Slack nudging—to keep documentation reviews moving.

  7. 7

    Accessibility regulation deadlines in 2019 forced rapid template updates, funded and staffed through developer time when cash and time were tight.

Highlights

User research described documentation as scattered and unreliable—sometimes missing online entirely—often trapped in PDFs and email attachments, making updates and discovery difficult.
GDS’s governance model required technical writer or lead developer approval on pull requests, turning documentation changes into a controlled, auditable workflow.
Middleman was chosen after reconsidering Hugo and Jekyll, with maintainability and extensibility outweighing “what everyone uses.”
When legacy docs conversion failed, GDS reframed the issue as content quality—rewriting bloated, outdated material in plain English before converting formats.
Accessibility compliance arrived with weeks to act, and GDS used developers’ 20% time to update templates and keep public sites compliant.

Topics

Mentioned

  • Jen Lambourne
  • GDS
  • UK
  • API
  • PR
  • CI
  • CD