0

I'm experimenting with the Sphinx AutoAPI to make docs more maintainable. It's doing a great job, except for one thing: breadcrumbs.

Within the docs generated by AutoAPI, breadcrumbs don't work as I'd expect. Instead of adding a linked item at each depth, we get “Docs >> ”, followed by a single linked item.

This is a usability a problem, because you can’t navigate back up to a parent article after clicking into a child.

picture of breadcrumbs not working

Note: I'm using the sphinx_rtd_theme, with a custom extrabody block for the header.

I haven't been able to find any documentation for the breadcrumbs in sphinx_rtd_theme.

Before diving into source code, I thought I'd ask if anyone else has seen/fixed this issue before. Thanks!

PS: You can see a draft PR for this work here: https://github.com/great-expectations/great_expectations/pull/1582

bad_coder
  • 11,289
  • 20
  • 44
  • 72
Abe
  • 22,738
  • 26
  • 82
  • 111
  • Try doing what the Pyramid docs do. We have breadcrumbs. Try changing your root `index.rst`'s `toctree` to include a new `module_docs/index.rst`, and in that new file use a glob. See https://github.com/Pylons/pyramid/blob/1.10-branch/docs/index.rst and https://github.com/Pylons/pyramid/blob/1.10-branch/docs/api/index.rst – Steve Piercy Jun 11 '20 at 21:48

1 Answers1

0

Thanks to Steve Piercy for a his helpful tip from the Pyramid project!

I added these lines at the end of my index.rst to activate breadcrumbs.

.. toctree::
   :maxdepth: 2

   autoapi/index

The breadcrumb links were still formatted like inline code, so I hacked my _static/style.css file like so:

ul.wy-breadcrumbs li code span.pre{
  font-size: 16px;
  font-family: HKGroteskPro, serif;
  font-weight: 400;
  color: rgb(155, 89, 182);
}

This styling isn't perfect, but close enough to not be jarring.

Abe
  • 22,738
  • 26
  • 82
  • 111