-
-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Pages and folded collections #572
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
pdmosses
wants to merge
19
commits into
just-the-docs:main
from
pdmosses:pages-and-folded-collections
Closed
Pages and folded collections #572
pdmosses
wants to merge
19
commits into
just-the-docs:main
from
pdmosses:pages-and-folded-collections
Conversation
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
- Move `docs/tests` pages to `_tests` collection. - Create `_tests_config.yml` to include tests. - Update `_cnfig.yml` instructions for including tests. - Update links in `_tests/navigation/index.md`. - Update `_layout/default.html` to output site.html_pages and/or collections. - Test by running `bundle exec jekyll serve --config _tests_config.yml`.
- Discount excluded pages
- Update the section on configuration of collections to include normal pages.
- Avoid irrelevant conflicts when updating from master
- Remove duplicated configuration code from `_tests_config.yml` - Rename to `_tests.yml` The tests collection is ignored when not mentioned, so it does not need to be excluded in `_config.yml`.
- Fix a bug with the breadcrumbs list, where a link on a grandchild page can point to the wrong parent page, following the solution suggested by @AdityaTiwari2102 in just-the-docs#477
The TOC/breadcrumb links in "Tests" and "Test Collection 1" exhibit the bug reported in just-the-docs#492. To fix the bug, this PR needs merging with just-the-docs#494.
Serve locally: ``` bundle exec jekyll serve --config _config.yml,_config_dev.yml ``` Test locally: ``` bundle exec jekyll serve --config _config.yml,_config_dev.yml,_tests.yml ```
- Fix a bug that affects sites with no child pages
- Relax version constraints in response to failing check `Could not find gem 'bundler (~> 2.1.4)' in any of the relevant sources`
- Cover all combinations of `search_exclude` and `nav_exclude` in `_tests.yml` Searching for C2 and C4 should return results, C1 and C5 not. Navigation for pages, C1, C2, C3 should appear, C4 and C5 not.
Manually merge the relevant changes from PR just-the-docs#494, namely: When configured for more than one collection, v0.3.2 produces empty TOCs of children in all but the last collection, due to referencing the overwritten `pages_list` in `_layouts/default.html`. When the same parent title is used in different collections, v0.3.2 can also produce a link to the wrong collection. Moreover, v0.3.3 can also produce incorrect breadcrumb links; see issue just-the-docs#492. - Move the breadcrumbs link variable assignments from `_layouts/default.html` to `_includes/nav.html`, and make it conditional on `page` being in the current collection. - Correct the condition for assignment to `second_level_url`, as in just-the-docs#477. - Change the variable used for the TOC from `children_list` to `toc_list`, move its assignment from `_layouts/default.html` to `_includes/nav.html`, and make it conditional on `page` being in the current collection.
Setting `nav_fold: true` for a `just_the_docs` collection makes it appear like a folded top-level navigation element. Its navigation is unfolded when any page in the collection is active.
Merged
Closed
mattxwang
added a commit
that referenced
this pull request
Jul 4, 2022
This PR combines (and resolves conflicts between) #448, #463, #466, #494, #495, #496, #498, and #572. The main aim is to facilitate use of several of the implemented features _together_, when using the fork as a remote theme. It should also simplify merging the included PRs into a future release. The branch [combination-rec-nav](https://github.com/pdmosses/just-the-docs/tree/combination-rec-nav) adds [multi-level navigation](#462) and (NEW:) [sibling links](#394) to the branch used for this PR. It includes updated [documentation for the navigation structure](https://pdmosses.github.io/just-the-docs/docs/navigation-structure/), and reorganised and extended [navigation tests](https://pdmosses.github.io/just-the-docs/tests/navigation/). The documentation and the tests can be browsed at the (temporary) [website published from the combination-rec-nav branch](https://pdmosses.github.io/just-the-docs/). _Caveat:_ The changes to v0.3.3 in this PR and #462 have not yet been reviewed or approved, and may need updating before merging into a release of the theme. If you use a branch from a PR as a remote theme, there is a risk of such updates affecting your website. Moreover, these branches are likely to be deleted after they have been merged. To avoid such problems, you could copy the branch that you want to use to your own fork of the theme. Co-authored-by: Matt Wang <[email protected]>
Member
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.
Implement #569, based on #448.
Setting
nav_fold: truefor ajust_the_docscollection makes it appear like a folded top-level navigation element. Its navigation is unfolded when any page in the collection is active.To test locally, use the jekyll option
--config _config.yml,_config_dev.yml,_tests.yml.