Write a task guide

The generated reference says what a method accepts and returns. A guide tells the reader which method to use for their task. Keep the contract in Javadoc and put the task, the choice and a working example in a handwritten page.

Start with a task and its result

This example guide links into the Apache Commons Lang API:

State the goal, show the smallest working example, then link to the reference for parameters, return values and exceptions.

Include a reference excerpt

.. java:autoclass:: org.apache.commons.lang3.StringUtils
   :members: abbreviate(java.lang.String,int)
   :no-index:

:no-index: lets the excerpt coexist with the generated API page. The excerpt includes the type’s full description, so a link is often enough.

Add the guide to the site

Save the page as docs/shorten.rst and list it before the reference:

.. toctree::
   :maxdepth: 2

   shorten
   api/index

Guides and API pages share navigation, search and the theme. Next, Add dependencies and publish covers dependencies and publishing from CI.