Skip to content

Instantly share code, notes, and snippets.

@blaisep
Created April 13, 2022 18:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save blaisep/9622847f46c88938cee5f1c24860ecd5 to your computer and use it in GitHub Desktop.
Save blaisep/9622847f46c88938cee5f1c24860ecd5 to your computer and use it in GitHub Desktop.

Docs are easy(ish) to write, but hard to maintain

The situation gets even worse where there are "too many cooks in the kitchen". In long-lived projects (many years, many versions) where there are lots of contributors, keeping docs current is a nightmare. As trust in the docs fails, so does confidence in the project ( cough >jenkins< cough ).

How do the big kids do it?

By way of example, allow me to present a few project we're all familiar with, because they are similar to Sanic and because we don't hear people complaining about the docs:

Docs are easy(ish) to write, but hard to maintain

The situation gets even worse where there are "too many cooks in the kitchen". In long-lived projects (many years, many versions) where there are lots of contributors, keeping docs current is a nightmare. As trust in the docs fails, so does confidence in the project ( cough >jenkins< cough ).

How do the big kids do it?

By way of example, allow me to present a few project we're all familiar with, because they are similar to Sanic and because we don't hear people complaining about the docs:

What makes these docs so special?

  • These docs need to be version specific because the code details may change from one release to the next.
  • They also need to be elastic enough that you avoid repeating material that has not changed.
  • There are many cross references because the same info can be relevant to different contexts (eg. Tutorial, Reference, Release Note)
  • If you look at the source you'll notice the use of symbols like :doc: (which resolves to a URL at compile time) and :term: (which resolves to a glossary entry ).
  • They keep the content and presentation separate, because sometimes the HTML needs to look like a web page and the PDF needs to look like a book.... or ePub, man page, or even a fancy presentation

By popular demand, here are a few of my favorites:

I'm excited to try this new Swagger/OpenAPI extension ( example )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment