Skip to content

Commit

Permalink
Compatibility with new 2.0 HTML base plugin
Browse files Browse the repository at this point in the history
Apply pathprefix without using the `url` filter.
  • Loading branch information
zachleat committed Aug 19, 2022
1 parent 41ce73d commit 63c06e8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions eleventy-navigation.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,9 @@ function findBreadcrumbEntries(nodes, activeKey, options = {}) {
}

function getUrlFilter(eleventyConfig) {
// First available in Eleventy 2.0.0-canary.15
// Short code path if pathPrefix is empty or the default
if(eleventyConfig.pathPrefix !== undefined && (eleventyConfig.pathPrefix === "/" || eleventyConfig.pathPrefix === "")) {
// eleventyConfig.pathPrefix was first available in Eleventy 2.0.0-canary.15
// And in Eleventy 2.0.0-canary.15 we recommend the a built-in transform for pathPrefix
if(eleventyConfig.pathPrefix !== undefined) {
return function(url) {
return url;
};
Expand Down

0 comments on commit 63c06e8

Please sign in to comment.