readthedocs / sphinx_rtd_theme

Sphinx theme from Read the Docs
https://sphinx-rtd-theme.readthedocs.io/
MIT License
4.8k stars 1.74k forks source link

Sticky navigation !working #1565

Open dylanh724 opened 5 months ago

dylanh724 commented 5 months ago

Problem

Trying to get sticky nav working with sphinx_rtd_theme, but experiencing inconsistencies.

From what I can tell, if I add any toctree to a child doc, the sticky tree completely wipes and just sticks to the new toctree.

If I exclude a toctree in a child doc, the sticky nav works as expected.

An example dir/file tree:

- conf.py
- index.rst
- content/
   - Foo1/
      - index.rst
   - Foo2/
      - index.rst
         - Bar/
            - index.rst

Where:

Output Examples

I couldn't find much about sticky nav, so any additional tips would help. Eg, I have a vanilla toctree nav that would output:

- Foo1
- Foo2

Within Foo1, I have no toctree, so the "sticky" nav persists

Within Foo2, I have a toctree that would output:

- Bar

The output result is missing Foo1:

- Foo2
   - Bar

What I was really was expecting was Foo1 to port over:

- Foo1
- Foo2
   - Bar

Reproducible Project

content/Foo1/index.rst

========
Foo1 Service
========

This is a doc!

content/Foo2/index.rst

========
Foo2 Service
========

.. toctree::

   Bar <Bar/index>

This is a doc!

content/Foo1/Bar/index.rst

=======
Bar Service
=======

This is a doc!

Expected Results

Foo1 would persist throughout any child nav

Environment Info

Conmemay200 commented 4 months ago

giao con mẹ tụi m

Conmemay200 commented 4 months ago

con đĩ mẹ tụi m thích láo lồn k hả mấy chó

Conmemay200 commented 4 months ago

đmm thích chơi ra chơi trc mặt vs t nè clm tụi m