Open
Conversation
Collaborator
|
One of the issue is that this is also used in the sidebar when generating navigation, so we also need to design how it would look like there. And more generally, if we allow one level of nesting why note more, in which case we get a full-menu. But I see where you are going here. |
Collaborator
Author
|
Feel free to take this one over and/or totally rework it @Carreau - I won't have time to get it over the finish line. |
Collaborator
|
Thanks @choldgraf It's on my todo list, but bugfixes first. |
14 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is a demonstration of allowing users to manually add dropdown links in the header. Currently this PR adds a new configuration value (
dropdown_links). This takes a list of dictionaries. Each dictionary has aname, and either has:urlin it, in which case it is treated as an extra top-level link in the header.itemsin it, in which caseitemsis treated as a list of links that will populate a dropdown menu.If
urldoes not start withhttp, then we assume it is a document and we resolve it by usingpathto(In this way, you can add extra items in the header in dropdown menus in order to save space. I also refactored this and the document links into their own templates in case other folks want to over-ride them.
Should this be merged into
extra_linksbehavior?Currently,
extra_linksallows users to provide extra top-level links that are "appended" to our site's document tree. We then use then_links_before_dropdownto automatically create aMoredropdown when the number of top-level links are above that number.Instead, we could allow
extra_linksto accept the Dropdown configuration provided here (it already accepts a list of dictionaries, so this would only mean supporting theitemsvalue to add dropdowns). Then,n_links_before_dropdownwould only apply to the site's documents, andextra_linkswould be used for any extra links.To do
References
external_linksto be an independent component calledextra_links#1061