Re-purpose external_links
to be an independent component called extra_links
#1061
Labels
kind: enhancement
New feature or request
We recently made it possible to put external links in the header by adding them directly in the toctree:
This makes "external link functionality" roughly duplicated between
toctree
-based external links, and external links that are provided in theconf.py
.It seems unnecessary to have the same functionality split between both, but I do think that we could use
conf.py
to define links outside of thetoctree
structure. This could then be its own independent component rather than something that is lumped in with the header navigation links component. This might let us expand its functionality a bit as well.Proposal
I propose that we:
external_links
in one or two releases, and use our currentnavbar-nav.html
component just fortoctree
-generated linksheader_extra_links
component and configuration value, and use this to let people add links + link dropdowns that are outside of thetoctree
structure. This would behave similar to our currentexternal-links
configuration, with a couple differences:doc
in the current page, it would resolve properly.{"kind": "dropdown", "items": [list-of-links]}
.This would let us separate the functionality of
toctree
navigation links and other links a person wants to add, which could be useful for themes that want to have more control over the functionality of the header links. (for example, they could even remove thenavbar-nav
links entirely and define a fully custom set of links viaextra-links
lone.Alternative implementation
If we wanted to keep things streamlined within a single "navigation links" approach, we could decide not to create a new HTML component, and instead add a configuration value for something like
include_top_level_pages_in_navigation_links
. IfFalse
, then the top pages wouldn't be in the navigation, and people could customize the remaining links via theextra_links
configuration alone, without needing to utilize a different component.References
Would also relate to
The text was updated successfully, but these errors were encountered: