pydata / pydata-sphinx-theme

A clean, three-column Sphinx theme with Bootstrap for the PyData community
https://pydata-sphinx-theme.readthedocs.io
BSD 3-Clause "New" or "Revised" License
557 stars 300 forks source link

Split and refactor generate_header_nav_before_dropdown #1773

Closed Carreau closed 1 month ago

Carreau commented 2 months ago

I think we need to split this function to not return html but just the necessary bits to generate the html for the navs, and have separate functions to generate navs in different place instead of messing with html strings.

We should also make it clearer function are exposed to end users of the theme.

_Originally posted by @Carreau in https://github.com/pydata/pydata-sphinx-theme/pull/1771#discussion_r1570427730_