Feature: Display main navigation to ancestors of excluded pages#1584
Draft
pdmosses wants to merge 6 commits intojust-the-docs:mainfrom
Draft
Feature: Display main navigation to ancestors of excluded pages#1584pdmosses wants to merge 6 commits intojust-the-docs:mainfrom
pdmosses wants to merge 6 commits intojust-the-docs:mainfrom
Conversation
See discussion just-the-docs#1566 for motivation. Currently (v0.10.0) the cached site-nav used in the sidebar contains links only to pages that are not excluded from the main navigation. When an excluded page is selected, the navigation path to any ancestors disappears. This draft PR makes the cached site-nav used in the sidebar contain links to all pages, but adds the `nav-exclude` class to the HTML of links to excluded pages. The CSS for the navigation then suppresses the display of those links, and the JS scrolls the navigation to the closest non-excluded ancestor link. Preliminary testing with the Just-the-Docs-Tests repo was successful with JS enabled. The generated page-specific CSS will need adjustment to give the same navigation when JS is disabled. Rigorous testing will be needed to ensure that this should be a non-breaking change for non-customised sites.
* Suppress sass-embedded deprecation warnings * Update all gems
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.
See discussion #1566 for motivation.
Currently (v0.10.0) the cached site-nav used in the sidebar contains links only to pages that are not excluded from the main navigation. When an excluded page is selected, the navigation path to any ancestors disappears.
This draft PR makes the cached site-nav used in the sidebar contain links to all pages, but adds the
nav-excludeclass to the HTML of links to excluded pages. The CSS for the navigation then suppresses the display of those links, and the JS scrolls the navigation to the closest non-excluded ancestor link.Preliminary testing with the Just-the-Docs-Tests repo was successful with JS enabled. The generated page-specific CSS will need adjustment to give the same navigation when JS is disabled. Rigorous testing will be needed to ensure that this should be a non-breaking change for non-customised sites.
The parameter
include.allof several included files is now redundant, and should be removed before the code is reviewed.(The included updates to
GemfileandGemfile.lockshould be removed when a new version of the theme is released and this PR is updated to use it.)To experiment with using this (draft) PR, use
theme: just-the-docsin_config.ymland the following in yourGemfile: