I think the last version of Ansible this worked for was 2.9. For ansible-base 2.10 / Ansible 2.10 the docs building process was completely changed, but this part of the documentation apparently was never updated accordingly.
Nowadays you should use a collection (you can have local collections next to your playbooks, similar to local modules), then you can use antsibull-docs + Sphinx to create HTML docs for your collection (documentation).
I knew I’ve seen that Makefile somewhere in the past. Thanks!
I presume I have to change COLLECTIONS_PATHS accordingly (e.g. through ansible.cfg)? ansible doesn’t seem to look for collections next to the playbooks out of the box.
No, you only need to change that configuration (except if you want to place the collections somewhere else).
Iy you have a playbook in a directory, create a subdirectory structure collections/ansible_collections/foo/bar/. In that directory you can place the contents of the foo.bar collection (like galaxy.yml) If you run a playbook in the directory which contains collections/, ansible will find the foo.bar collection.
The nested collections/ansible_collections/ structure is important (and also somewhat annoying ).