dan  /  writing  /  token docs

Generating token docs for free

A Style Dictionary proof of concept that documents design tokens as part of the same build that ships them.

While automating design tokens and thinking about how to scale them, I kept running into the same problem: documentation drifting out of date. Some dead code I found in a Style Dictionary version turned out to be the seed of an idea — generate the documentation from the same tokens that ship in production, on every build.

I hand-coded this proof-of-concept version of the GSG design-system documentation site. The goal was to use the design-token JSON structure itself — including its description fields — to generate the docs, with filters by type and by the hierarchy already written into the tokens.

Here's the proof of concept, with filtering of tokens by type and by where they sit in the token structure.

GSG design-system documentation site, proof of concept

Like most PoCs, it's sitting on a shelf for now — but I'm hoping it takes on a life of its own in a future project.

06 / contact

Need a design system that ships in weeks? Let's talk.

Permanent, contract, or leadership — open to remote and relocation across the UK and Ireland.

Illustrated portrait of Dan Danowski