readthedocs / sphinx-autoapi

A new approach to API documentation in Sphinx.
https://sphinx-autoapi.readthedocs.io/
MIT License
415 stars 126 forks source link

Modules not shown as headers #360

Closed APN-Pucky closed 1 year ago

APN-Pucky commented 1 year ago

My doc showed Subpackages, Package Contents etc as headlines instead of the actual module names, since the first line module was not handled as header: 2022-12-05 14_53_25-Subpackages 2022-12-05 14_53_18-hepi

The rst-file actually shows it as a header:

1 :py:mod:`hepi`
2 ===================

When I place a newline (or anything) above the first line then the header shows up properly again.

This unexpected behavior only happens only when I set rst_prolog in conf.py. I double checked that I place 2 newlines in the prolog command.

The issue #302 seems slightly related.

AWhetter commented 1 year ago

This is an issue in Sphinx, so I have submitted an issue upstream: https://github.com/sphinx-doc/sphinx/issues/11437