Skip to content
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

Support full identifiers in breadcrumbs #1011

Merged
merged 4 commits into from Dec 17, 2016

Conversation

denisdefreyne
Copy link
Member

This adds support for full identifiers (e.g. /projects/nanoc.md) to #breadcrumbs_trail. Currently, only legacy identifiers (e.g. /projects/nanoc/) are supported.

Fix for #1010.

Detailed description

This change first of all refactors the existing code to construct a prefix array for a given item identifier. For example, /projects/nanoc/ is turned into ['', '/projects', '/projects/nanoc']. This in turn is used to construct the array of item identifiers which will be the breadcrumbs trail.

For full identifiers, the procedure is the same, with the main difference that the item matching /index.* is treated specially. This item is considered the root item and has the same role as the / item when using legacy identifiers.

Related issues

@denisdefreyne denisdefreyne merged commit 60187e9 into master Dec 17, 2016
@denisdefreyne denisdefreyne deleted the gh-1010-non-legacy-breadcrumbs branch December 17, 2016 09:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant