Repository navigation
feat: group a section's card index the way its sidebar groups pages - #561
Merged
Merged
Conversation
This was referenced Nov 4, 2026
Collaborator
|
@drbenvincent, please rebase. |
A generated index ignored parent directories and split cards by whether a page had an image, so the gallery and the sidebar showed two different arrangements of the same section. The index now uses the sidebar's groups, titles, and order. Set index_groups: false to keep the flat grid.
drbenvincent
force-pushed
the
feat/grouped-section-index
branch
from
November 5, 2026 19:30
cb60dda to
488659a
Compare
Collaborator
|
@drbenvincent, thank you. |
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.
The generated card index and the sidebar were two views of the same section, and they did not agree. The sidebar grouped pages by subdirectory. The index ignored those groups, put every page with an image in one grid, and dropped pages without an image into a list under a horizontal rule.
When a section has subdirectory groups, or
sidebar_groupsis set, the generated index now uses those same groups, titles, and order. Each group is a Markdown heading and one.section-cardsgrid. A page without an image stays in its group. Top-level pages stay in one grid before the first heading. Pages thatsidebar_groupsdoes not name stay after the groups, with no heading. A section with no groups keeps the flat image-then-plain layout.index_groups: falsekeeps that layout even when the sidebar has groups. A hand-writtenindex.qmdis still used as-is.The headings are Markdown, so a site that shows a table of contents will list them. The card markup is unchanged.
Fixes #553.