From 609cb7fef1eb05d80638b53b62af690965f9d21e Mon Sep 17 00:00:00 2001 From: Paul Robert Lloyd Date: Tue, 12 Dec 2023 23:55:37 +0000 Subject: [PATCH] Debug --- lib/filters/items-from-navigation.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/filters/items-from-navigation.js b/lib/filters/items-from-navigation.js index 31be7ed6..91f2bdef 100644 --- a/lib/filters/items-from-navigation.js +++ b/lib/filters/items-from-navigation.js @@ -10,12 +10,16 @@ const smart = require('./smart.js') */ module.exports = (eleventyNavigation, pageUrl = false, options = {}) => { const items = [] + console.log('=======') + console.log('pageUrl', pageUrl) eleventyNavigation.forEach(item => { + console.log('item.url', item.url) + const isCurrentPage = pageUrl && item.url === pageUrl const navItem = { current: isCurrentPage, - parent: pageUrl && pageUrl.startsWith(item.url), + // parent: pageUrl && pageUrl.startsWith(item.url), href: item.url, text: smart(item.title), children: item.children