0

I would like to disable the top navigation bar of the ReadTheDocs theme. For other theme, for instance classic it is just an option

html_theme = "classic"
html_theme_options = {
    "showrelbartop": False
}

How I can modify the read the docs theme to disable this top navigation bar?

Edit: After processing the source files with make html, I have to remove these lines in html files

<div role="navigation" aria-label="breadcrumbs navigation">
  <ul class="wy-breadcrumbs">
    <li><a href="index.html">Docs</a> &raquo;</li>
    <li></li>
      <li class="wy-breadcrumbs-aside">
      </li>
  </ul>
  <hr/>
</div>

to obtain the expected result. Is it possible to obtain this result before compiling the sources with make html?

mzjn
  • 48,958
  • 13
  • 128
  • 248

2 Answers2

2

I assume you refer to the breadcrumbs (breadcrumbs.html). You can simply open the main template file - layout.html - and delete or comment out the following line:

{% include "breadcrumbs.html" %}
Timotheus.Kampik
  • 2,425
  • 1
  • 22
  • 30
  • Thanks for the answer but I already do it after the process that generates the files by removing some code. I will edit my question to make it clear. I want to do it before the generation of html files. – Martin Rosalie Feb 24 '16 at 14:07
  • Please reconsider my answer: If you remove the include statement from the **template** file - layout.html, than it won't appear in your html output. The generated output is based on the template file, so you need to edit the template only once. – Timotheus.Kampik Feb 24 '16 at 15:40
1

An old question, but I needed this as well. A simpler answer than the currently accepted one, which works for Sphinx==3.5.3 and sphinx-rtd-theme==0.5.2 is:

  • in docs/_templates/, create a file called breadcrumbs.html
  • in that file, write an html comment like <!-- Empty override file take the place of env/lib/python3.8/site-packages/sphinx_rtd_theme/breadcrumbs.html, which generates the top nav breadcrumbs. -->.

Rebuild, and you're done.

J.Z.
  • 882
  • 9
  • 13