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

Projects
None yet
1 participant
@ddfreyne
Copy link
Member

ddfreyne commented Dec 17, 2016

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

@ddfreyne ddfreyne force-pushed the gh-1010-non-legacy-breadcrumbs branch 2 times, most recently from eac9bfa to bdbf1ec Dec 17, 2016

@ddfreyne ddfreyne modified the milestone: 4.4.3 Dec 17, 2016

@ddfreyne ddfreyne force-pushed the gh-1010-non-legacy-breadcrumbs branch from bdbf1ec to bdc9339 Dec 17, 2016

@ddfreyne ddfreyne merged commit 60187e9 into master Dec 17, 2016

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

@ddfreyne ddfreyne deleted the gh-1010-non-legacy-breadcrumbs branch Dec 17, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.