Skip to content
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions eleventy.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,14 @@ function findBy(data, path, value) {
return false;
}

if (Array.isArray(gotten)) {
if (typeof value === "string") {
let valueLower = value.toLowerCase();

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This might lead to some issues down the line (Turkish-I problem).

I recommend using localeCompare instead.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great catch, thanks! Switched to localeCompare with { sensitivity: "base" } in both the array and string comparison paths.

return gotten.some((item) => typeof item === "string" && item.toLowerCase() === valueLower);
}
return gotten.includes(value);
}

if (typeof value === "string") {
let valueLower = value.toLowerCase();
let dataLower = gotten.toLowerCase();
Expand Down
2 changes: 1 addition & 1 deletion src/_data/starters/freshjuice-11ty-starter.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
"url": "https://github.com/freshjuice-dev/freshjuice-11ty-starter",
"name": "Snappy Lemon",
"description": "Modern 11ty v3 starter with TailwindCSS v4, Alpine.js, CloudCannon CMS integration, Bookshop visual editing, Pagefind search, and accessibility-first design",
"author": "freshjuice-dev",
"author": ["freshjuice-dev", "reatlat"],
"demo": "https://snappy-lemon-starter.freshjuice.dev/"
}
2 changes: 1 addition & 1 deletion src/_data/starters/freshjuice-berry-blast.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
"url": "https://github.com/freshjuice-dev/berry-blast-11ty-starter",
"name": "Berry Blast",
"description": "Modern 11ty v3 starter with TailwindCSS v4, Alpine.js, Pagefind search, Phosphor Icons, Shiki syntax highlighting, and WCAG 2.1 AA accessibility",
"author": "freshjuice-dev",
"author": ["freshjuice-dev", "reatlat"],
"demo": "https://berry-blast-starter.freshjuice.dev/"
}
2 changes: 1 addition & 1 deletion src/_data/starters/freshjuice-cyber-banana.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
"url": "https://github.com/freshjuice-dev/cyber-banana-11ty-starter",
"name": "Berry Blast",
"description": "A cyberpunk-themed developer portfolio starter with 11ty, Tailwind CSS, and vanilla JavaScript.",
"author": "freshjuice-dev",
"author": ["freshjuice-dev", "reatlat"],
"demo": "https://cyber-banana-starter.freshjuice.dev/"
}
2 changes: 1 addition & 1 deletion src/_data/starters/freshjuice-electric-lime.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
"url": "https://github.com/freshjuice-dev/electric-lime-11ty-starter",
"name": "Electric Lime",
"description": "Vibrant 11ty v3 starter with TailwindCSS v4, Alpine.js, Pagefind search, Shiki syntax highlighting, image optimization, and WCAG 2.1 AA accessibility",
"author": "freshjuice-dev",
"author": ["freshjuice-dev", "reatlat"],
"demo": "https://electric-lime-starter.freshjuice.dev/"
}