Skip to content

Commit

Permalink
Debug
Browse files Browse the repository at this point in the history
  • Loading branch information
paulrobertlloyd committed Dec 12, 2023
1 parent dcda21a commit 609cb7f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/filters/items-from-navigation.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 609cb7f

Please sign in to comment.