From 928e7aecff6c9be2d7732aa16a68b5a169d65df2 Mon Sep 17 00:00:00 2001 From: Leyla Becker Date: Sun, 22 Feb 2026 11:05:52 -0600 Subject: [PATCH] fix: normalized slugs for recipes --- recipes/Apple Caramel Upside Down Cake.md | 4 ++-- recipes/Apple Streusel.md | 2 +- recipes/Chicken Noodle Soup.md | 2 +- recipes/Cinnamon Bundt Cake.md | 2 +- recipes/Enchiladas.md | 4 ++-- recipes/Fettuccine.md | 2 +- recipes/Indian Fried Rice (rough draft).md | 2 +- recipes/Instant Curry Ramen (rough draft).md | 2 +- recipes/Kombucha - Raspberry Rhubarb.md | 2 +- recipes/Kombucha Scoby.md | 2 +- recipes/Kombucha Template.md | 2 +- recipes/Lasagna.md | 6 +++--- recipes/Pizza Dough.md | 2 +- recipes/Red pasta sauce (rough draft).md | 2 +- recipes/Stuffing.md | 2 +- recipes/Tikka Masala Paneer.md | 4 ++-- recipes/Tom and Jerry's.md | 2 +- recipes/Tortellini.md | 4 ++-- recipes/Turkey Seitan.md | 2 +- recipes/Turnover Pastry.md | 2 +- recipes/recipes.11tydata.js | 17 ++++++++++++++--- 21 files changed, 40 insertions(+), 29 deletions(-) diff --git a/recipes/Apple Caramel Upside Down Cake.md b/recipes/Apple Caramel Upside Down Cake.md index d93403f..6dd7514 100644 --- a/recipes/Apple Caramel Upside Down Cake.md +++ b/recipes/Apple Caramel Upside Down Cake.md @@ -5,8 +5,8 @@ makes: 1 cake ## Ingredients - [ ] 3 apples -- [ ] [Caramel Upside Down Cake Topping](/recipe/Caramel Upside Down Cake Topping/) -- [ ] [Upside Down Cake Batter](/recipe/Upside Down Cake Batter/) +- [ ] [Caramel Upside Down Cake Topping](/recipe/caramel-upside-down-cake-topping/) +- [ ] [Upside Down Cake Batter](/recipe/upside-down-cake-batter/) - [ ] oil for pan ## Tools - 8 inch x 8 inch baking pan diff --git a/recipes/Apple Streusel.md b/recipes/Apple Streusel.md index e04c84c..af88750 100644 --- a/recipes/Apple Streusel.md +++ b/recipes/Apple Streusel.md @@ -6,7 +6,7 @@ title: Apple Streusel - [ ] apples 4 - 8 - [ ] brown sugar - [ ] all purpose flour -- [ ] [cinnamon streusel](Cinnamon%20Streusel) +- [ ] [cinnamon streusel](/recipe/cinnamon-streusel/) ## Tools - dutch oven ## Steps diff --git a/recipes/Chicken Noodle Soup.md b/recipes/Chicken Noodle Soup.md index c9c98fc..7493b7d 100644 --- a/recipes/Chicken Noodle Soup.md +++ b/recipes/Chicken Noodle Soup.md @@ -10,7 +10,7 @@ title: Chicken Noodle Soup - [ ] carrots 3-4 sticks - [ ] onion - [ ] 10 cups broth -- [ ] [Egg Noodles (rough draft)](/recipe/Egg Noodles/) uncooked +- [ ] [Egg Noodles (rough draft)](/recipe/egg-noodles/) uncooked - [ ] garlic 2 cloves - [ ] salt - [ ] black pepper diff --git a/recipes/Cinnamon Bundt Cake.md b/recipes/Cinnamon Bundt Cake.md index 0247b37..e031139 100644 --- a/recipes/Cinnamon Bundt Cake.md +++ b/recipes/Cinnamon Bundt Cake.md @@ -13,7 +13,7 @@ makes: 1 Bundt Cake - [ ] eggs 2 - [ ] vanilla extract to taste - [ ] butter/pam to grease pan -- [ ] [cinnamon streusel](Cinnamon%20Streusel) +- [ ] [cinnamon streusel](/recipe/cinnamon-streusel/) ## Tools - stove - mixing bowl diff --git a/recipes/Enchiladas.md b/recipes/Enchiladas.md index bcc8239..0ac52cb 100644 --- a/recipes/Enchiladas.md +++ b/recipes/Enchiladas.md @@ -15,8 +15,8 @@ title: Enchiladas - [ ] red chili powder - [ ] cumin - [ ] large tortillas [^1] -- [ ] [Chili White Sauce](/recipe/Chili White Sauce/) -- [ ] [Red pasta sauce (rough draft)](/recipe/Red pasta sauce/) +- [ ] [Chili White Sauce](/recipe/chili-white-sauce/) +- [ ] [Red pasta sauce (rough draft)](/recipe/red-pasta-sauce/) - [ ] oil to grease pan ## Tools - pan diff --git a/recipes/Fettuccine.md b/recipes/Fettuccine.md index d88e667..10f0d4c 100644 --- a/recipes/Fettuccine.md +++ b/recipes/Fettuccine.md @@ -3,7 +3,7 @@ title: Fettuccine --- ## Ingredients -- [ ] [Rolled Pasta Dough (non-vegan)](/recipe/Rolled Pasta Dough (non-vegan)/) Sheets width 6 +- [ ] [Rolled Pasta Dough (non-vegan)](/recipe/rolled-pasta-dough-non-vegan/) Sheets width 6 - [ ] water - [ ] salt ## Tools diff --git a/recipes/Indian Fried Rice (rough draft).md b/recipes/Indian Fried Rice (rough draft).md index b2c3e2c..e9ba86e 100644 --- a/recipes/Indian Fried Rice (rough draft).md +++ b/recipes/Indian Fried Rice (rough draft).md @@ -6,7 +6,7 @@ aliases: --- ## Ingredients -- [ ] day old [White Long Grain Rice](/recipe/White Long Grain Rice/) +- [ ] day old [White Long Grain Rice](/recipe/white-long-grain-rice/) - [ ] mustard seeds - [ ] sesame seeds - [ ] cumin seeds diff --git a/recipes/Instant Curry Ramen (rough draft).md b/recipes/Instant Curry Ramen (rough draft).md index 7a3ebc9..8750546 100644 --- a/recipes/Instant Curry Ramen (rough draft).md +++ b/recipes/Instant Curry Ramen (rough draft).md @@ -6,7 +6,7 @@ draft: true ## Ingredients - [ ] instant ramen - chicken 1 packet - [ ] nori (sea weed) 1 sheet -- [ ] [soft boiled eggs](Soft%20Boiled%20Eggs%20(rough%20draft).md) 2 eggs +- [ ] [soft boiled eggs](/recipe/soft-boiled-eggs-rough-draft/) 2 eggs - [ ] narutomaki (cured fish cakes) 3 slices - [ ] carrots - [ ] celery diff --git a/recipes/Kombucha - Raspberry Rhubarb.md b/recipes/Kombucha - Raspberry Rhubarb.md index 6e407d9..8f31075 100644 --- a/recipes/Kombucha - Raspberry Rhubarb.md +++ b/recipes/Kombucha - Raspberry Rhubarb.md @@ -4,7 +4,7 @@ draft: true --- ## Ingredients -- [ ] [Kombucha Scoby](/recipe/Kombucha Scoby/) 6 parts by volume +- [ ] [Kombucha Scoby](/recipe/kombucha-scoby/) 6 parts by volume - [ ] fruit puree 1 part by volume - [ ] rhubarb 1 part by weight - [ ] raspberry 2 parts by weight diff --git a/recipes/Kombucha Scoby.md b/recipes/Kombucha Scoby.md index ef0d72c..1084af5 100644 --- a/recipes/Kombucha Scoby.md +++ b/recipes/Kombucha Scoby.md @@ -27,4 +27,4 @@ draft: true [^1]: can be substituted with store bought kombucha for first scoby [^2]: tap water works but is slower and has a higher chance of failure due to chlorine/fluoride in water -[^3]: sweet to sour balance matches [Kombucha Calibrator](/recipe/Kombucha Calibrator/) or ph is below then 4.0 +[^3]: sweet to sour balance matches [Kombucha Calibrator](/recipe/kombucha-calibrator/) or ph is below then 4.0 diff --git a/recipes/Kombucha Template.md b/recipes/Kombucha Template.md index 427004a..8d005c2 100644 --- a/recipes/Kombucha Template.md +++ b/recipes/Kombucha Template.md @@ -4,7 +4,7 @@ draft: true --- ## Ingredients -- [ ] [Kombucha Scoby](/recipe/Kombucha Scoby/) 6 parts by volume +- [ ] [Kombucha Scoby](/recipe/kombucha-scoby/) 6 parts by volume - [ ] fruit puree 1 part by volume ## Tools - blender diff --git a/recipes/Lasagna.md b/recipes/Lasagna.md index e31fe15..873da31 100644 --- a/recipes/Lasagna.md +++ b/recipes/Lasagna.md @@ -5,9 +5,9 @@ makes: 1 dish of pasta --- ## Ingredients -- [ ] [rolled pasta dough](/recipe/Rolled Pasta Dough (non-vegan)/) -- [ ] [soffritto](/recipe/Soffritto/) -- [ ] [béchamel](/recipe/Béchamel/) +- [ ] [rolled pasta dough](/recipe/rolled-pasta-dough-non-vegan/) +- [ ] [soffritto](/recipe/soffritto/) +- [ ] [béchamel](/recipe/bechamel/) - [ ] parmesan - [ ] provola (provolone) - [ ] mushroom diff --git a/recipes/Pizza Dough.md b/recipes/Pizza Dough.md index 73e1dc5..b1d20c4 100644 --- a/recipes/Pizza Dough.md +++ b/recipes/Pizza Dough.md @@ -5,7 +5,7 @@ makes: 6 25 cm pizzas ## notes - can be stored in fridge for up to 3 days ## Ingredients -- [ ] [Pizza Biga](/recipe/Pizza Biga/) +- [ ] [Pizza Biga](/recipe/pizza-biga/) - [ ] cold water 210g - [ ] salt 25g - [ ] malt 10g [^1] diff --git a/recipes/Red pasta sauce (rough draft).md b/recipes/Red pasta sauce (rough draft).md index 3860224..6d406fa 100644 --- a/recipes/Red pasta sauce (rough draft).md +++ b/recipes/Red pasta sauce (rough draft).md @@ -5,7 +5,7 @@ draft: true ### notes - try some lemon juice ## Ingredients -- [ ] [soffritto](Soffritto.md) +- [ ] [soffritto](/recipe/soffritto/) - [ ] rosemary - [ ] thyme - [ ] parsley diff --git a/recipes/Stuffing.md b/recipes/Stuffing.md index f518130..c9d169b 100644 --- a/recipes/Stuffing.md +++ b/recipes/Stuffing.md @@ -2,7 +2,7 @@ title: "Stuffing" --- ## Ingredients -- [ ] stale [bread](Bread.md) 1 loaf +- [ ] stale [bread](/recipe/bread/) 1 loaf - [ ] carrot 2 large roots - [ ] celery 4 stalks - [ ] white onion 1 diff --git a/recipes/Tikka Masala Paneer.md b/recipes/Tikka Masala Paneer.md index 6d72141..e0f4857 100644 --- a/recipes/Tikka Masala Paneer.md +++ b/recipes/Tikka Masala Paneer.md @@ -5,8 +5,8 @@ title: "Tikka Masala Paneer" - fenugreek can be substituted with coriander leaves - paneer cooks better with convection set high ## Ingredients -- [ ] [Tikka Marinade](/recipe/Tikka Marinade/) -- [ ] [Tikka Masala Gravy](/recipe/Tikka Masala Gravy/) +- [ ] [Tikka Marinade](/recipe/tikka-marinade-paneer/) +- [ ] [Tikka Masala Gravy](/recipe/tikka-masala-gravy/) - [ ] heavy cream 6 tablespoons - [ ] fenugreek ## Tools diff --git a/recipes/Tom and Jerry's.md b/recipes/Tom and Jerry's.md index 1a4750d..8ff1d6d 100644 --- a/recipes/Tom and Jerry's.md +++ b/recipes/Tom and Jerry's.md @@ -5,7 +5,7 @@ makes: 1 mug ### notes - Alcohol can be omitted for virgin T&J's ## Ingredients -- [ ] [Tom and Jerry Mix](/recipe/Tom and Jerry Mix/) 40g +- [ ] [Tom and Jerry Mix](/recipe/tom-and-jerry-mix/) 40g - [ ] spiced rum 25g - [ ] milk 240g ## Tools diff --git a/recipes/Tortellini.md b/recipes/Tortellini.md index e5d7850..19d3803 100644 --- a/recipes/Tortellini.md +++ b/recipes/Tortellini.md @@ -4,8 +4,8 @@ title: "Tortellini" ### notes - ## Ingredients -- [ ] [Rolled Pasta Dough](/recipe/Rolled Pasta Dough/) -- [ ] [Mushroom Pasta Filling (rough draft)](/recipe/Mushroom Pasta Filling/) +- [ ] [Rolled Pasta Dough](/recipe/rolled-pasta-dough/) +- [ ] [Mushroom Pasta Filling (rough draft)](/recipe/mushroom-pasta-filling/) ## Tools - knife - pot diff --git a/recipes/Turkey Seitan.md b/recipes/Turkey Seitan.md index 59b14de..d3e4b0b 100644 --- a/recipes/Turkey Seitan.md +++ b/recipes/Turkey Seitan.md @@ -8,7 +8,7 @@ draft: true - [ ] water 1 table spoon - [ ] white miso paste 1 tablespoon - [ ] onion powder 2 teaspoons -- [ ] [Chicken Broth Powder](/recipe/Chicken Broth Powder/) 2 teaspoons +- [ ] [Chicken Broth Powder](/recipe/chicken-broth-powder/) 2 teaspoons - [ ] garlic powder 1 teaspoon - [ ] liquid smoke 1 teaspoon - [ ] apple vinegar vinegar 1 teaspoon diff --git a/recipes/Turnover Pastry.md b/recipes/Turnover Pastry.md index 3cf7977..5128ba2 100644 --- a/recipes/Turnover Pastry.md +++ b/recipes/Turnover Pastry.md @@ -3,7 +3,7 @@ title: "Turnover Pastry" draft: true --- ## Ingredients -- [ ] [Turnover Dough](/recipe/Turnover Dough/) +- [ ] [Turnover Dough](/recipe/turnover-dough/) - [ ] Jam or Filling ## Tools - sheet pan diff --git a/recipes/recipes.11tydata.js b/recipes/recipes.11tydata.js index 0fc0cc6..040b09c 100644 --- a/recipes/recipes.11tydata.js +++ b/recipes/recipes.11tydata.js @@ -41,6 +41,17 @@ const getPlantBased = (filePath) => { return null; } +const slugify = (text) => { + return text + .toLowerCase() + .replace(/\s+/g, '-') // Replace spaces with hyphens + .replace(/[()]/g, '') // Remove parentheses + .replace(/[^\w-]+/g, '') // Remove non-word chars except hyphens + .replace(/--+/g, '-') // Replace multiple hyphens with single hyphen + .replace(/^-+/, '') // Trim hyphens from start + .replace(/-+$/, ''); // Trim hyphens from end +} + const getSlugFromPath = (filePath) => { // Normalize the path - remove leading ./ if present const normalizedPath = filePath.startsWith('./') ? filePath.slice(2) : filePath; @@ -54,12 +65,12 @@ const getSlugFromPath = (filePath) => { const secondPart = parts[1]; // If it's a .md file at the top level (recipes/foo.md), strip the extension if (secondPart.endsWith('.md')) { - return path.basename(secondPart, '.md'); + return slugify(path.basename(secondPart, '.md')); } // Otherwise it's a folder name (recipes/bar/v1.md -> bar) - return secondPart; + return slugify(secondPart); } - return path.basename(filePath, '.md'); + return slugify(path.basename(filePath, '.md')); } const getTitleFromSlug = (slug) => {