fix: normalized slugs for recipes
This commit is contained in:
parent
72b26472c3
commit
928e7aecff
21 changed files with 40 additions and 29 deletions
|
|
@ -5,8 +5,8 @@ makes: 1 cake
|
||||||
|
|
||||||
## Ingredients
|
## Ingredients
|
||||||
- [ ] 3 apples
|
- [ ] 3 apples
|
||||||
- [ ] [Caramel Upside Down Cake Topping](/recipe/Caramel Upside Down Cake Topping/)
|
- [ ] [Caramel Upside Down Cake Topping](/recipe/caramel-upside-down-cake-topping/)
|
||||||
- [ ] [Upside Down Cake Batter](/recipe/Upside Down Cake Batter/)
|
- [ ] [Upside Down Cake Batter](/recipe/upside-down-cake-batter/)
|
||||||
- [ ] oil for pan
|
- [ ] oil for pan
|
||||||
## Tools
|
## Tools
|
||||||
- 8 inch x 8 inch baking pan
|
- 8 inch x 8 inch baking pan
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ title: Apple Streusel
|
||||||
- [ ] apples 4 - 8
|
- [ ] apples 4 - 8
|
||||||
- [ ] brown sugar
|
- [ ] brown sugar
|
||||||
- [ ] all purpose flour
|
- [ ] all purpose flour
|
||||||
- [ ] [cinnamon streusel](Cinnamon%20Streusel)
|
- [ ] [cinnamon streusel](/recipe/cinnamon-streusel/)
|
||||||
## Tools
|
## Tools
|
||||||
- dutch oven
|
- dutch oven
|
||||||
## Steps
|
## Steps
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@ title: Chicken Noodle Soup
|
||||||
- [ ] carrots 3-4 sticks
|
- [ ] carrots 3-4 sticks
|
||||||
- [ ] onion
|
- [ ] onion
|
||||||
- [ ] 10 cups broth
|
- [ ] 10 cups broth
|
||||||
- [ ] [Egg Noodles (rough draft)](/recipe/Egg Noodles/) uncooked
|
- [ ] [Egg Noodles (rough draft)](/recipe/egg-noodles/) uncooked
|
||||||
- [ ] garlic 2 cloves
|
- [ ] garlic 2 cloves
|
||||||
- [ ] salt
|
- [ ] salt
|
||||||
- [ ] black pepper
|
- [ ] black pepper
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@ makes: 1 Bundt Cake
|
||||||
- [ ] eggs 2
|
- [ ] eggs 2
|
||||||
- [ ] vanilla extract to taste
|
- [ ] vanilla extract to taste
|
||||||
- [ ] butter/pam to grease pan
|
- [ ] butter/pam to grease pan
|
||||||
- [ ] [cinnamon streusel](Cinnamon%20Streusel)
|
- [ ] [cinnamon streusel](/recipe/cinnamon-streusel/)
|
||||||
## Tools
|
## Tools
|
||||||
- stove
|
- stove
|
||||||
- mixing bowl
|
- mixing bowl
|
||||||
|
|
|
||||||
|
|
@ -15,8 +15,8 @@ title: Enchiladas
|
||||||
- [ ] red chili powder
|
- [ ] red chili powder
|
||||||
- [ ] cumin
|
- [ ] cumin
|
||||||
- [ ] large tortillas [^1]
|
- [ ] large tortillas [^1]
|
||||||
- [ ] [Chili White Sauce](/recipe/Chili White Sauce/)
|
- [ ] [Chili White Sauce](/recipe/chili-white-sauce/)
|
||||||
- [ ] [Red pasta sauce (rough draft)](/recipe/Red pasta sauce/)
|
- [ ] [Red pasta sauce (rough draft)](/recipe/red-pasta-sauce/)
|
||||||
- [ ] oil to grease pan
|
- [ ] oil to grease pan
|
||||||
## Tools
|
## Tools
|
||||||
- pan
|
- pan
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@ title: Fettuccine
|
||||||
---
|
---
|
||||||
|
|
||||||
## Ingredients
|
## 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
|
- [ ] water
|
||||||
- [ ] salt
|
- [ ] salt
|
||||||
## Tools
|
## Tools
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ aliases:
|
||||||
---
|
---
|
||||||
|
|
||||||
## Ingredients
|
## 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
|
- [ ] mustard seeds
|
||||||
- [ ] sesame seeds
|
- [ ] sesame seeds
|
||||||
- [ ] cumin seeds
|
- [ ] cumin seeds
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ draft: true
|
||||||
## Ingredients
|
## Ingredients
|
||||||
- [ ] instant ramen - chicken 1 packet
|
- [ ] instant ramen - chicken 1 packet
|
||||||
- [ ] nori (sea weed) 1 sheet
|
- [ ] 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
|
- [ ] narutomaki (cured fish cakes) 3 slices
|
||||||
- [ ] carrots
|
- [ ] carrots
|
||||||
- [ ] celery
|
- [ ] celery
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ draft: true
|
||||||
---
|
---
|
||||||
|
|
||||||
## Ingredients
|
## 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
|
- [ ] fruit puree 1 part by volume
|
||||||
- [ ] rhubarb 1 part by weight
|
- [ ] rhubarb 1 part by weight
|
||||||
- [ ] raspberry 2 parts by weight
|
- [ ] raspberry 2 parts by weight
|
||||||
|
|
|
||||||
|
|
@ -27,4 +27,4 @@ draft: true
|
||||||
|
|
||||||
[^1]: can be substituted with store bought kombucha for first scoby
|
[^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
|
[^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
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ draft: true
|
||||||
---
|
---
|
||||||
|
|
||||||
## Ingredients
|
## 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
|
- [ ] fruit puree 1 part by volume
|
||||||
## Tools
|
## Tools
|
||||||
- blender
|
- blender
|
||||||
|
|
|
||||||
|
|
@ -5,9 +5,9 @@ makes: 1 dish of pasta
|
||||||
---
|
---
|
||||||
|
|
||||||
## Ingredients
|
## Ingredients
|
||||||
- [ ] [rolled pasta dough](/recipe/Rolled Pasta Dough (non-vegan)/)
|
- [ ] [rolled pasta dough](/recipe/rolled-pasta-dough-non-vegan/)
|
||||||
- [ ] [soffritto](/recipe/Soffritto/)
|
- [ ] [soffritto](/recipe/soffritto/)
|
||||||
- [ ] [béchamel](/recipe/Béchamel/)
|
- [ ] [béchamel](/recipe/bechamel/)
|
||||||
- [ ] parmesan
|
- [ ] parmesan
|
||||||
- [ ] provola (provolone)
|
- [ ] provola (provolone)
|
||||||
- [ ] mushroom
|
- [ ] mushroom
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@ makes: 6 25 cm pizzas
|
||||||
## notes
|
## notes
|
||||||
- can be stored in fridge for up to 3 days
|
- can be stored in fridge for up to 3 days
|
||||||
## Ingredients
|
## Ingredients
|
||||||
- [ ] [Pizza Biga](/recipe/Pizza Biga/)
|
- [ ] [Pizza Biga](/recipe/pizza-biga/)
|
||||||
- [ ] cold water 210g
|
- [ ] cold water 210g
|
||||||
- [ ] salt 25g
|
- [ ] salt 25g
|
||||||
- [ ] malt 10g [^1]
|
- [ ] malt 10g [^1]
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@ draft: true
|
||||||
### notes
|
### notes
|
||||||
- try some lemon juice
|
- try some lemon juice
|
||||||
## Ingredients
|
## Ingredients
|
||||||
- [ ] [soffritto](Soffritto.md)
|
- [ ] [soffritto](/recipe/soffritto/)
|
||||||
- [ ] rosemary
|
- [ ] rosemary
|
||||||
- [ ] thyme
|
- [ ] thyme
|
||||||
- [ ] parsley
|
- [ ] parsley
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
title: "Stuffing"
|
title: "Stuffing"
|
||||||
---
|
---
|
||||||
## Ingredients
|
## Ingredients
|
||||||
- [ ] stale [bread](Bread.md) 1 loaf
|
- [ ] stale [bread](/recipe/bread/) 1 loaf
|
||||||
- [ ] carrot 2 large roots
|
- [ ] carrot 2 large roots
|
||||||
- [ ] celery 4 stalks
|
- [ ] celery 4 stalks
|
||||||
- [ ] white onion 1
|
- [ ] white onion 1
|
||||||
|
|
|
||||||
|
|
@ -5,8 +5,8 @@ title: "Tikka Masala Paneer"
|
||||||
- fenugreek can be substituted with coriander leaves
|
- fenugreek can be substituted with coriander leaves
|
||||||
- paneer cooks better with convection set high
|
- paneer cooks better with convection set high
|
||||||
## Ingredients
|
## Ingredients
|
||||||
- [ ] [Tikka Marinade](/recipe/Tikka Marinade/)
|
- [ ] [Tikka Marinade](/recipe/tikka-marinade-paneer/)
|
||||||
- [ ] [Tikka Masala Gravy](/recipe/Tikka Masala Gravy/)
|
- [ ] [Tikka Masala Gravy](/recipe/tikka-masala-gravy/)
|
||||||
- [ ] heavy cream 6 tablespoons
|
- [ ] heavy cream 6 tablespoons
|
||||||
- [ ] fenugreek
|
- [ ] fenugreek
|
||||||
## Tools
|
## Tools
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@ makes: 1 mug
|
||||||
### notes
|
### notes
|
||||||
- Alcohol can be omitted for virgin T&J's
|
- Alcohol can be omitted for virgin T&J's
|
||||||
## Ingredients
|
## Ingredients
|
||||||
- [ ] [Tom and Jerry Mix](/recipe/Tom and Jerry Mix/) 40g
|
- [ ] [Tom and Jerry Mix](/recipe/tom-and-jerry-mix/) 40g
|
||||||
- [ ] spiced rum 25g
|
- [ ] spiced rum 25g
|
||||||
- [ ] milk 240g
|
- [ ] milk 240g
|
||||||
## Tools
|
## Tools
|
||||||
|
|
|
||||||
|
|
@ -4,8 +4,8 @@ title: "Tortellini"
|
||||||
### notes
|
### notes
|
||||||
-
|
-
|
||||||
## Ingredients
|
## Ingredients
|
||||||
- [ ] [Rolled Pasta Dough](/recipe/Rolled Pasta Dough/)
|
- [ ] [Rolled Pasta Dough](/recipe/rolled-pasta-dough/)
|
||||||
- [ ] [Mushroom Pasta Filling (rough draft)](/recipe/Mushroom Pasta Filling/)
|
- [ ] [Mushroom Pasta Filling (rough draft)](/recipe/mushroom-pasta-filling/)
|
||||||
## Tools
|
## Tools
|
||||||
- knife
|
- knife
|
||||||
- pot
|
- pot
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@ draft: true
|
||||||
- [ ] water 1 table spoon
|
- [ ] water 1 table spoon
|
||||||
- [ ] white miso paste 1 tablespoon
|
- [ ] white miso paste 1 tablespoon
|
||||||
- [ ] onion powder 2 teaspoons
|
- [ ] 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
|
- [ ] garlic powder 1 teaspoon
|
||||||
- [ ] liquid smoke 1 teaspoon
|
- [ ] liquid smoke 1 teaspoon
|
||||||
- [ ] apple vinegar vinegar 1 teaspoon
|
- [ ] apple vinegar vinegar 1 teaspoon
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@ title: "Turnover Pastry"
|
||||||
draft: true
|
draft: true
|
||||||
---
|
---
|
||||||
## Ingredients
|
## Ingredients
|
||||||
- [ ] [Turnover Dough](/recipe/Turnover Dough/)
|
- [ ] [Turnover Dough](/recipe/turnover-dough/)
|
||||||
- [ ] Jam or Filling
|
- [ ] Jam or Filling
|
||||||
## Tools
|
## Tools
|
||||||
- sheet pan
|
- sheet pan
|
||||||
|
|
|
||||||
|
|
@ -41,6 +41,17 @@ const getPlantBased = (filePath) => {
|
||||||
return null;
|
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) => {
|
const getSlugFromPath = (filePath) => {
|
||||||
// Normalize the path - remove leading ./ if present
|
// Normalize the path - remove leading ./ if present
|
||||||
const normalizedPath = filePath.startsWith('./') ? filePath.slice(2) : filePath;
|
const normalizedPath = filePath.startsWith('./') ? filePath.slice(2) : filePath;
|
||||||
|
|
@ -54,12 +65,12 @@ const getSlugFromPath = (filePath) => {
|
||||||
const secondPart = parts[1];
|
const secondPart = parts[1];
|
||||||
// If it's a .md file at the top level (recipes/foo.md), strip the extension
|
// If it's a .md file at the top level (recipes/foo.md), strip the extension
|
||||||
if (secondPart.endsWith('.md')) {
|
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)
|
// 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) => {
|
const getTitleFromSlug = (slug) => {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue