I'm increasingly persuaded that a page-per-function organisation of docs is the best.
For example, this command in Redis has its own page: https://redis.io/commands/acl-cat/
Using a whole page enables you to have several examples without overwhelming the reader.