diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index fb1af73..8eb89eb 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -27,21 +27,19 @@ jobs: - name: Checkout πŸ›ŽοΈ uses: actions/checkout@v4 - - name: Install mdBook πŸ“š + - name: Install Zola 🦎 run: | - wget https://github.com/rust-lang/mdBook/releases/download/v0.4.52/mdbook-v0.4.52-x86_64-unknown-linux-gnu.tar.gz - tar -xzf mdbook-v0.4.52-x86_64-unknown-linux-gnu.tar.gz - sudo mv mdbook /usr/local/bin/ + curl -sL https://github.com/getzola/zola/releases/download/v0.22.1/zola-v0.22.1-x86_64-unknown-linux-gnu.tar.gz \ + | sudo tar -xz -C /usr/local/bin - name: Build πŸ”¨ - run: | - ./wrapper.sh build + run: zola build - name: Upload static files as artifact id: deployment uses: actions/upload-pages-artifact@v3 with: - path: book/ + path: public/ deploy: environment: diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 3ffd1ec..e9bc77a 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -13,18 +13,16 @@ jobs: - name: Checkout πŸ›ŽοΈ uses: actions/checkout@v4 - - name: Install mdBook πŸ“š + - name: Install Zola 🦎 run: | - wget https://github.com/rust-lang/mdBook/releases/download/v0.4.52/mdbook-v0.4.52-x86_64-unknown-linux-gnu.tar.gz - tar -xzf mdbook-v0.4.52-x86_64-unknown-linux-gnu.tar.gz - sudo mv mdbook /usr/local/bin/ + curl -sL https://github.com/getzola/zola/releases/download/v0.22.1/zola-v0.22.1-x86_64-unknown-linux-gnu.tar.gz \ + | sudo tar -xz -C /usr/local/bin - name: Build πŸ”¨ - run: | - ./wrapper.sh build + run: zola build - name: Upload static files as artifact id: deployment uses: actions/upload-pages-artifact@v3 with: - path: book/ + path: public/ diff --git a/.gitignore b/.gitignore index f9b88f6..a48cf0d 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1 @@ -book -/src/SUMMARY.md +public diff --git a/book.toml b/book.toml deleted file mode 100644 index eed8104..0000000 --- a/book.toml +++ /dev/null @@ -1,27 +0,0 @@ -[book] -authors = ["Noah Pendleton"] -language = "en" -title = "Recipes" - -[output.html] -additional-css = ["theme/custom.css"] -additional-js = ["scripts/update-favicon.js", "scripts/hero-search.js"] -edit-url-template = "https://github.com/noahp/recipes/edit/main/{path}" -git-repository-url = "https://github.com/noahp/recipes/tree/main" - -[preprocessor.generate_summary] -# this hook generates the src/SUMMARY.md file when it runs. mdbook loads the -# file first before running preprocessor hooks like this; the way the -# preprocessor hooks are supposed to work, i'd generate the SUMMARY.md data and -# insert it into the JSON data (which is substituting a fair chunk of what -# mdbook does when scooping up the source content). -# -# instead, i'm just using it as a spot to cough out the src/SUMMARY.md file every -# time mdbook rebuilds (eg when doing 'serve' and detecting file changes). this -# means that the SUMMARY.md file will always be 1 generation behind. in practice -# it's not too janky when i'm adding a file, so long as i trigger 1 extra mdbook -# build cycle after adding a new file. -# -# the CI stuff uses the wrapper.sh script to pre-warm SUMMARY.md by running the -# script once before starting mdbook. -command = "python3 generate-summary.py" diff --git a/config.toml b/config.toml new file mode 100644 index 0000000..89840a0 --- /dev/null +++ b/config.toml @@ -0,0 +1,14 @@ +base_url = "https://noahpendleton.com/recipes" +title = "Recipes" +default_language = "en" +build_search_index = true + +[markdown] + +[search] +index_format = "elasticlunr_javascript" + +[extra] +github_url = "https://github.com/noahp/recipes/tree/main" +edit_base = "https://github.com/noahp/recipes/edit/main/content" +categories = ["baking", "mains", "misc", "preserves", "sides"] diff --git a/content/_index.md b/content/_index.md new file mode 100644 index 0000000..32c4fe2 --- /dev/null +++ b/content/_index.md @@ -0,0 +1,3 @@ ++++ +title = "Recipes" ++++ diff --git a/content/baking/_index.md b/content/baking/_index.md new file mode 100644 index 0000000..a9bee65 --- /dev/null +++ b/content/baking/_index.md @@ -0,0 +1,4 @@ ++++ +title = "Baking" +sort_by = "title" ++++ diff --git a/src/baking/beignets.md b/content/baking/beignets.md similarity index 97% rename from src/baking/beignets.md rename to content/baking/beignets.md index 64e7123..d232cc1 100644 --- a/src/baking/beignets.md +++ b/content/baking/beignets.md @@ -1,3 +1,7 @@ ++++ +title = "🍩 Beignets" ++++ + # 🍩 Beignets [Original recipe](https://www.kingarthurflour.com/recipes/classic-beignets-recipe) diff --git a/src/baking/english-muffins.md b/content/baking/english-muffins.md similarity index 96% rename from src/baking/english-muffins.md rename to content/baking/english-muffins.md index 0bbef42..9fed72f 100644 --- a/src/baking/english-muffins.md +++ b/content/baking/english-muffins.md @@ -1,3 +1,7 @@ ++++ +title = "🍞 English Muffins" ++++ + # 🍞 English Muffins [Original recipe](https://www.kingarthurflour.com/recipes/english-muffins-recipe) diff --git a/src/baking/foccacia.md b/content/baking/foccacia.md similarity index 95% rename from src/baking/foccacia.md rename to content/baking/foccacia.md index cfb308e..a160036 100644 --- a/src/baking/foccacia.md +++ b/content/baking/foccacia.md @@ -1,6 +1,10 @@ ++++ +title = "πŸ«“ Focaccia" ++++ + # πŸ«“ Focaccia -![](../pics/focaccia.jpg) +![](../../pics/focaccia.jpg) _roughly based on Ken Forkish's recipe_ diff --git a/src/baking/gallette.md b/content/baking/gallette.md similarity index 98% rename from src/baking/gallette.md rename to content/baking/gallette.md index 89ba364..7db45bc 100644 --- a/src/baking/gallette.md +++ b/content/baking/gallette.md @@ -1,3 +1,7 @@ ++++ +title = "πŸ₯§ Galette" ++++ + # πŸ₯§ Galette [Original recipe from Brian Lagerstrom](https://www.youtube.com/watch?v=sSkjBodTzGU) diff --git a/src/baking/garlic-naan.md b/content/baking/garlic-naan.md similarity index 97% rename from src/baking/garlic-naan.md rename to content/baking/garlic-naan.md index 5739e67..87ec8f2 100644 --- a/src/baking/garlic-naan.md +++ b/content/baking/garlic-naan.md @@ -1,3 +1,7 @@ ++++ +title = "πŸ₯™ Garlic Naan" ++++ + # πŸ₯™ Garlic Naan [Original recipe](https://www.reddit.com/r/food/comments/d1a962/homemade_butter_chicken_with_garlic_naan/ezk2m4a/) diff --git a/src/baking/hamburger-buns.md b/content/baking/hamburger-buns.md similarity index 98% rename from src/baking/hamburger-buns.md rename to content/baking/hamburger-buns.md index 725bd1b..2f0e1dc 100644 --- a/src/baking/hamburger-buns.md +++ b/content/baking/hamburger-buns.md @@ -1,3 +1,7 @@ ++++ +title = "πŸ” Hamburger Buns" ++++ + # πŸ” Hamburger Buns [Original recipe](https://www.youtube.com/watch?v=gTGSUYMu6Ns) diff --git a/src/baking/madelines.md b/content/baking/madelines.md similarity index 97% rename from src/baking/madelines.md rename to content/baking/madelines.md index e408eda..d94ef1c 100644 --- a/src/baking/madelines.md +++ b/content/baking/madelines.md @@ -1,3 +1,7 @@ ++++ +title = "🐚 Madelines" ++++ + # 🐚 Madelines [Original recipe](https://www.allrecipes.com/recipe/9954/french-butter-cakes-madeleines/) diff --git a/src/baking/moms-cookies.md b/content/baking/moms-cookies.md similarity index 94% rename from src/baking/moms-cookies.md rename to content/baking/moms-cookies.md index be14d88..77236df 100644 --- a/src/baking/moms-cookies.md +++ b/content/baking/moms-cookies.md @@ -1,3 +1,7 @@ ++++ +title = "πŸͺ Mom's Cookies" ++++ + # πŸͺ Mom's Cookies ## Makes diff --git a/src/baking/popovers.md b/content/baking/popovers.md similarity index 93% rename from src/baking/popovers.md rename to content/baking/popovers.md index 1c8e820..6277f0f 100644 --- a/src/baking/popovers.md +++ b/content/baking/popovers.md @@ -1,3 +1,7 @@ ++++ +title = "🧁 Popovers" ++++ + # 🧁 Popovers _Ideally use a popover-specific pan- I have this one, @@ -6,7 +10,7 @@ https://www.amazon.com/Chicago-Metallic-Professional-Mini-Popover-10-75-Inch/dp/ [Original recipe](https://www.seriouseats.com/recipes/2012/03/popover-recipe.html) -![muffins](../pics/popovers.jpg) +![muffins](../../pics/popovers.jpg) ## Ingredients diff --git a/src/baking/pretzels.md b/content/baking/pretzels.md similarity index 97% rename from src/baking/pretzels.md rename to content/baking/pretzels.md index 015f6ac..8732751 100644 --- a/src/baking/pretzels.md +++ b/content/baking/pretzels.md @@ -1,3 +1,7 @@ ++++ +title = "πŸ₯¨ Pretzels" ++++ + # πŸ₯¨ Pretzels ## Ingredients diff --git a/content/mains/_index.md b/content/mains/_index.md new file mode 100644 index 0000000..9dd1962 --- /dev/null +++ b/content/mains/_index.md @@ -0,0 +1,4 @@ ++++ +title = "Mains" +sort_by = "title" ++++ diff --git a/src/mains/beef-stew.md b/content/mains/beef-stew.md similarity index 99% rename from src/mains/beef-stew.md rename to content/mains/beef-stew.md index 05e838b..fb970b0 100644 --- a/src/mains/beef-stew.md +++ b/content/mains/beef-stew.md @@ -1,3 +1,7 @@ ++++ +title = "🍲 Beef Stew" ++++ + # 🍲 Beef Stew [Original recipe](https://www.seriouseats.com/recipes/2016/01/all-american-beef-stew-recipe.html) diff --git a/src/mains/bibimbap.md b/content/mains/bibimbap.md similarity index 98% rename from src/mains/bibimbap.md rename to content/mains/bibimbap.md index 771a9ab..60f3013 100644 --- a/src/mains/bibimbap.md +++ b/content/mains/bibimbap.md @@ -1,3 +1,7 @@ ++++ +title = "🍜 Bibimbap" ++++ + # 🍜 Bibimbap [Original recipe](https://www.seriouseats.com/recipes/2020/09/bibimbap.html) diff --git a/src/mains/butter-chicken.md b/content/mains/butter-chicken.md similarity index 97% rename from src/mains/butter-chicken.md rename to content/mains/butter-chicken.md index a407386..dd28284 100644 --- a/src/mains/butter-chicken.md +++ b/content/mains/butter-chicken.md @@ -1,3 +1,7 @@ ++++ +title = "πŸ› Butter Chicken (Murgh Makhani)" ++++ + # πŸ› Butter Chicken (Murgh Makhani) [Original recipe](https://www.reddit.com/r/food/comments/d1a962/homemade_butter_chicken_with_garlic_naan/ezk2m4a/) diff --git a/src/mains/chicken-and-rice.md b/content/mains/chicken-and-rice.md similarity index 98% rename from src/mains/chicken-and-rice.md rename to content/mains/chicken-and-rice.md index f1f610a..fc00e58 100644 --- a/src/mains/chicken-and-rice.md +++ b/content/mains/chicken-and-rice.md @@ -1,3 +1,7 @@ ++++ +title = "πŸ› Chicken and Rice" ++++ + # πŸ› Chicken and Rice [Original recipe](https://www.ethanchlebowski.com/cooking-techniques-recipes/street-cart-chicken-amp-yellow-rice) diff --git a/src/mains/crepes.md b/content/mains/crepes.md similarity index 97% rename from src/mains/crepes.md rename to content/mains/crepes.md index 1fa0ff9..663dc7e 100644 --- a/src/mains/crepes.md +++ b/content/mains/crepes.md @@ -1,3 +1,7 @@ ++++ +title = "πŸ₯ž Crepes" ++++ + # πŸ₯ž Crepes [Original recipe](https://www.seriouseats.com/recipes/2017/03/basic-crepes-batter-recipe.html) diff --git a/src/mains/dutch-baby.md b/content/mains/dutch-baby.md similarity index 97% rename from src/mains/dutch-baby.md rename to content/mains/dutch-baby.md index e5a1e0d..495e126 100644 --- a/src/mains/dutch-baby.md +++ b/content/mains/dutch-baby.md @@ -1,3 +1,7 @@ ++++ +title = "πŸ₯ž Dutch Baby" ++++ + # πŸ₯ž Dutch Baby [Original recipe](https://www.seriouseats.com/recipes/2012/04/dutch-baby-pancake-recipe.html) diff --git a/src/mains/falafel.md b/content/mains/falafel.md similarity index 98% rename from src/mains/falafel.md rename to content/mains/falafel.md index 4566819..0512fbb 100644 --- a/src/mains/falafel.md +++ b/content/mains/falafel.md @@ -1,3 +1,7 @@ ++++ +title = "πŸ§† Falafel" ++++ + # πŸ§† Falafel [Original recipe](https://www.seriouseats.com/recipes/2016/03/the-food-lab-vegan-experience-best-homemade-falafel-recipe.html) diff --git a/src/mains/feta-pasta.md b/content/mains/feta-pasta.md similarity index 95% rename from src/mains/feta-pasta.md rename to content/mains/feta-pasta.md index f902f19..1a6c02b 100644 --- a/src/mains/feta-pasta.md +++ b/content/mains/feta-pasta.md @@ -1,3 +1,7 @@ ++++ +title = "🍝 Baked Feta Pasta (Uunifeta)" ++++ + # 🍝 Baked Feta Pasta (Uunifeta) [Original recipe](https://www.youtube.com/watch?v=U3gvRjIQ6Lo) diff --git a/src/mains/lentil-soup.md b/content/mains/lentil-soup.md similarity index 96% rename from src/mains/lentil-soup.md rename to content/mains/lentil-soup.md index 26c0821..85e78f1 100644 --- a/src/mains/lentil-soup.md +++ b/content/mains/lentil-soup.md @@ -1,3 +1,7 @@ ++++ +title = "πŸ₯£ Si's Red Lentil Soup" ++++ + # πŸ₯£ Si's Red Lentil Soup ## Ingredients diff --git a/src/mains/ny-pizza.md b/content/mains/ny-pizza.md similarity index 97% rename from src/mains/ny-pizza.md rename to content/mains/ny-pizza.md index bbd7d99..e48cbf4 100644 --- a/src/mains/ny-pizza.md +++ b/content/mains/ny-pizza.md @@ -1,3 +1,7 @@ ++++ +title = "πŸ• New York Style Pizza" ++++ + # πŸ• New York Style Pizza [Original recipe](https://www.reddit.com/r/FoodPorn/comments/e2fhg5/second_attempt_on_new_yorkstyle_pizza/f8vcyd6/) diff --git a/src/mains/stir-fried-eggplant-and-chicken.md b/content/mains/stir-fried-eggplant-and-chicken.md similarity index 96% rename from src/mains/stir-fried-eggplant-and-chicken.md rename to content/mains/stir-fried-eggplant-and-chicken.md index 4e90e34..a690236 100644 --- a/src/mains/stir-fried-eggplant-and-chicken.md +++ b/content/mains/stir-fried-eggplant-and-chicken.md @@ -1,3 +1,7 @@ ++++ +title = "πŸ₯˜ Chinese Eggplant and Chicken Stir Fry" ++++ + # πŸ₯˜ Chinese Eggplant and Chicken Stir Fry [Original recipe](https://thewoksoflife.com/chinese-eggplant-garlic-sauce/) diff --git a/content/misc/_index.md b/content/misc/_index.md new file mode 100644 index 0000000..a37c1ae --- /dev/null +++ b/content/misc/_index.md @@ -0,0 +1,4 @@ ++++ +title = "Misc" +sort_by = "title" ++++ diff --git a/src/misc/cooking-equipment.md b/content/misc/cooking-equipment.md similarity index 99% rename from src/misc/cooking-equipment.md rename to content/misc/cooking-equipment.md index 7b5fd78..c32bb83 100644 --- a/src/misc/cooking-equipment.md +++ b/content/misc/cooking-equipment.md @@ -1,3 +1,7 @@ ++++ +title = "πŸ› οΈ Cooking Equipment" ++++ + # πŸ› οΈ Cooking Equipment _Idea from https://tylertringas.com/cooking-for-founders/_ diff --git a/src/misc/dill-yogurt-sauce.md b/content/misc/dill-yogurt-sauce.md similarity index 93% rename from src/misc/dill-yogurt-sauce.md rename to content/misc/dill-yogurt-sauce.md index 35a4f7c..182a0fe 100644 --- a/src/misc/dill-yogurt-sauce.md +++ b/content/misc/dill-yogurt-sauce.md @@ -1,3 +1,7 @@ ++++ +title = "🌿 Dill-Yogurt Sauce" ++++ + # 🌿 Dill-Yogurt Sauce Recipe from [J. Kenji LΓ³pez-Alt](https://www.youtube.com/watch?v=p8nJIiQo7jw) diff --git a/src/misc/miso-dressing.md b/content/misc/miso-dressing.md similarity index 91% rename from src/misc/miso-dressing.md rename to content/misc/miso-dressing.md index 00845be..67f5c33 100644 --- a/src/misc/miso-dressing.md +++ b/content/misc/miso-dressing.md @@ -1,3 +1,7 @@ ++++ +title = "πŸ₯— Miso Dressing" ++++ + # πŸ₯— Miso Dressing Recipe from [Helen Rennie](https://www.youtube.com/watch?v=nx-1NLI4Ahk&t=1s) diff --git a/src/misc/ranch-dip.md b/content/misc/ranch-dip.md similarity index 95% rename from src/misc/ranch-dip.md rename to content/misc/ranch-dip.md index ed367ca..fce34ec 100644 --- a/src/misc/ranch-dip.md +++ b/content/misc/ranch-dip.md @@ -1,3 +1,7 @@ ++++ +title = "πŸ₯— Ranch Dip" ++++ + # πŸ₯— Ranch Dip Recipe from [J. Kenji LΓ³pez-Alt](https://www.youtube.com/watch?v=p8nJIiQo7jw) diff --git a/src/misc/roasted-garlic.md b/content/misc/roasted-garlic.md similarity index 58% rename from src/misc/roasted-garlic.md rename to content/misc/roasted-garlic.md index 33cdee6..20b737b 100644 --- a/src/misc/roasted-garlic.md +++ b/content/misc/roasted-garlic.md @@ -1,3 +1,7 @@ ++++ +title = "πŸ§„ Roasted Garlic" ++++ + # πŸ§„ Roasted Garlic See also[Serious Eats](https://www.seriouseats.com/roasted-garlic) on the @@ -13,23 +17,23 @@ subject. 1. preheat oven to 400-425F 2. peel all but the innermost paper off a whole head of garlic - [](../pics/garlic-unpeeled.jpg) - [](../pics/garlic-peeled.jpg) + [](../../pics/garlic-unpeeled.jpg) + [](../../pics/garlic-peeled.jpg) 3. use a knife to trim the top 1/4" (5mm) or so off the top of each clove (chop your knife through the top of the head instead of doing each clove individually) - [](../pics/trimming-garlic.jpg) - [](../pics/trimmed-garlic.jpg) + [](../../pics/trimming-garlic.jpg) + [](../../pics/trimmed-garlic.jpg) 4. place in a small oven-safe ramikin or pyrex (or wrap in aluminum foil) and drizzle a tablespoon or two of olive oil over the top - [](../pics/oiled-garlic.jpg) + [](../../pics/oiled-garlic.jpg) 5. roast in the oven until the top of the garlic cloves start to brown (15-20 minutes or so). to remove the cloves, let the head cool and then squeeze out with your fingers, or use a fork to pull them out of the skin - [](../pics/roasted-garlic.jpg) + [](../../pics/roasted-garlic.jpg) diff --git a/content/preserves/_index.md b/content/preserves/_index.md new file mode 100644 index 0000000..2d29cfa --- /dev/null +++ b/content/preserves/_index.md @@ -0,0 +1,4 @@ ++++ +title = "Preserves" +sort_by = "title" ++++ diff --git a/src/preserves/andouille-sausage.md b/content/preserves/andouille-sausage.md similarity index 97% rename from src/preserves/andouille-sausage.md rename to content/preserves/andouille-sausage.md index f24455c..1763d13 100644 --- a/src/preserves/andouille-sausage.md +++ b/content/preserves/andouille-sausage.md @@ -1,3 +1,7 @@ ++++ +title = "🌭 Andouille Sausage" ++++ + # 🌭 Andouille Sausage [Original recipe](https://tasteofartisan.com/andouille-sausage/) diff --git a/src/preserves/chili-crisp.md b/content/preserves/chili-crisp.md similarity index 98% rename from src/preserves/chili-crisp.md rename to content/preserves/chili-crisp.md index b0bce66..e91db70 100644 --- a/src/preserves/chili-crisp.md +++ b/content/preserves/chili-crisp.md @@ -1,3 +1,7 @@ ++++ +title = "🌢️ Chili Crisp" ++++ + # 🌢️ Chili Crisp [Original recipe](https://www.seriouseats.com/recipes/2018/04/homemade-spicy-chili-crisp.html) diff --git a/src/preserves/kabanosy.md b/content/preserves/kabanosy.md similarity index 97% rename from src/preserves/kabanosy.md rename to content/preserves/kabanosy.md index 3f19ca1..00ed5af 100644 --- a/src/preserves/kabanosy.md +++ b/content/preserves/kabanosy.md @@ -1,3 +1,7 @@ ++++ +title = "🌭 Kabanosy" ++++ + # 🌭 Kabanosy [![](https://4.bp.blogspot.com/-gxjXG9m4Qyo/WXcyvORK88I/AAAAAAAAFoA/tFiHzfarqvwhYQWzbsH9uGSy6gOfkRBFQCK4BGAYYCw/s640/IMG_20170724_183129.jpg)](http://4.bp.blogspot.com/-gxjXG9m4Qyo/WXcyvORK88I/AAAAAAAAFoA/tFiHzfarqvwhYQWzbsH9uGSy6gOfkRBFQCK4BGAYYCw/s1600/IMG_20170724_183129.jpg) diff --git a/src/preserves/kielbasa.md b/content/preserves/kielbasa.md similarity index 99% rename from src/preserves/kielbasa.md rename to content/preserves/kielbasa.md index 9c6316c..2fe2480 100644 --- a/src/preserves/kielbasa.md +++ b/content/preserves/kielbasa.md @@ -1,3 +1,7 @@ ++++ +title = "πŸ– Kielbasa" ++++ + # πŸ– Kielbasa Recipe from diff --git a/src/preserves/kimchi.md b/content/preserves/kimchi.md similarity index 96% rename from src/preserves/kimchi.md rename to content/preserves/kimchi.md index 4021d89..e70286b 100644 --- a/src/preserves/kimchi.md +++ b/content/preserves/kimchi.md @@ -1,6 +1,10 @@ ++++ +title = "πŸ₯¬ Kimchi" ++++ + # πŸ₯¬ Kimchi -![kimchi picture](../pics/kimchi.jpg) +![kimchi picture](../../pics/kimchi.jpg) Basic vegan Kimchi recipe. diff --git a/content/preserves/moms-pickles.md b/content/preserves/moms-pickles.md new file mode 100644 index 0000000..b1ba25f --- /dev/null +++ b/content/preserves/moms-pickles.md @@ -0,0 +1,7 @@ ++++ +title = "πŸ₯’ Mom's Pickles" ++++ + +# πŸ₯’ Mom's Pickles + +drawing diff --git a/src/preserves/pancetta.md b/content/preserves/pancetta.md similarity index 97% rename from src/preserves/pancetta.md rename to content/preserves/pancetta.md index d06c946..2873e7b 100644 --- a/src/preserves/pancetta.md +++ b/content/preserves/pancetta.md @@ -1,3 +1,7 @@ ++++ +title = "πŸ₯“ Pancetta" ++++ + # πŸ₯“ Pancetta Original Recipe from _Home Production of Quality Meats and Sausages by Stanley diff --git a/src/preserves/pickled-fresno-chilis.md b/content/preserves/pickled-fresno-chilis.md similarity index 91% rename from src/preserves/pickled-fresno-chilis.md rename to content/preserves/pickled-fresno-chilis.md index 13cf470..921cdf0 100644 --- a/src/preserves/pickled-fresno-chilis.md +++ b/content/preserves/pickled-fresno-chilis.md @@ -1,3 +1,7 @@ ++++ +title = "🌢️ Pickled Fresno Chilis" ++++ + # 🌢️ Pickled Fresno Chilis [Original recipe](https://www.youtube.com/watch?v=YQqmLBwK8UM) diff --git a/src/preserves/pickled-red-onions.md b/content/preserves/pickled-red-onions.md similarity index 93% rename from src/preserves/pickled-red-onions.md rename to content/preserves/pickled-red-onions.md index c6b5a3f..1fa0f19 100644 --- a/src/preserves/pickled-red-onions.md +++ b/content/preserves/pickled-red-onions.md @@ -1,3 +1,7 @@ ++++ +title = "πŸ§… Pickled Red Onions" ++++ + # πŸ§… Pickled Red Onions [Original diff --git a/src/preserves/smashed-miso-pickles.md b/content/preserves/smashed-miso-pickles.md similarity index 96% rename from src/preserves/smashed-miso-pickles.md rename to content/preserves/smashed-miso-pickles.md index a9c4407..12c52fe 100644 --- a/src/preserves/smashed-miso-pickles.md +++ b/content/preserves/smashed-miso-pickles.md @@ -1,3 +1,7 @@ ++++ +title = "πŸ₯’ Smashed Miso Pickles" ++++ + # πŸ₯’ Smashed Miso Pickles References: diff --git a/content/sides/_index.md b/content/sides/_index.md new file mode 100644 index 0000000..d77a88a --- /dev/null +++ b/content/sides/_index.md @@ -0,0 +1,4 @@ ++++ +title = "Sides" +sort_by = "title" ++++ diff --git a/src/sides/austrian-potato-salad.md b/content/sides/austrian-potato-salad.md similarity index 96% rename from src/sides/austrian-potato-salad.md rename to content/sides/austrian-potato-salad.md index 8ed27db..f65ffe8 100644 --- a/src/sides/austrian-potato-salad.md +++ b/content/sides/austrian-potato-salad.md @@ -1,3 +1,7 @@ ++++ +title = "πŸ₯” Austrian-Style Potato Salad (ErdΓ€pfelsalat)" ++++ + # πŸ₯” Austrian-Style Potato Salad (ErdΓ€pfelsalat) [Original recipe](https://www.seriouseats.com/erdapfelsalat-austrian-style-potato-salad-recipe) diff --git a/src/sides/baba-ganoush.md b/content/sides/baba-ganoush.md similarity index 98% rename from src/sides/baba-ganoush.md rename to content/sides/baba-ganoush.md index 7e4b6ae..f0bc1b4 100644 --- a/src/sides/baba-ganoush.md +++ b/content/sides/baba-ganoush.md @@ -1,3 +1,7 @@ ++++ +title = "πŸ₯£ Baba Ganoush" ++++ + # πŸ₯£ Baba Ganoush [Original Recipe](https://www.seriouseats.com/the-best-baba-ganoush-recipe) diff --git a/src/sides/braised-cabbage.md b/content/sides/braised-cabbage.md similarity index 97% rename from src/sides/braised-cabbage.md rename to content/sides/braised-cabbage.md index 1142036..8b97d20 100644 --- a/src/sides/braised-cabbage.md +++ b/content/sides/braised-cabbage.md @@ -1,3 +1,7 @@ ++++ +title = "πŸ₯¬ Braised Cabbage" ++++ + # πŸ₯¬ Braised Cabbage [Original recipe](https://www.bonappetit.com/recipe/caramelized-cabbage) diff --git a/src/sides/crispy-potatoes.md b/content/sides/crispy-potatoes.md similarity index 93% rename from src/sides/crispy-potatoes.md rename to content/sides/crispy-potatoes.md index 0c7cbec..730661c 100644 --- a/src/sides/crispy-potatoes.md +++ b/content/sides/crispy-potatoes.md @@ -1,3 +1,7 @@ ++++ +title = "πŸ₯” Crispy Potatoes" ++++ + # πŸ₯” Crispy Potatoes [Original recipe](https://www.seriouseats.com/recipes/2016/12/the-best-roast-potatoes-ever-recipe.html) @@ -30,4 +34,4 @@ 7. toss with the reserved herb/garlic mixture, add more salt + pepper if necessary -![crispy potatoes](../pics/crispy-potatoes.jpg) +![crispy potatoes](../../pics/crispy-potatoes.jpg) diff --git a/src/sides/egg-rolls.md b/content/sides/egg-rolls.md similarity index 97% rename from src/sides/egg-rolls.md rename to content/sides/egg-rolls.md index 1d1f325..22ad99f 100644 --- a/src/sides/egg-rolls.md +++ b/content/sides/egg-rolls.md @@ -1,3 +1,7 @@ ++++ +title = "πŸ₯  Egg rolls" ++++ + # πŸ₯  Egg rolls [Original recipe](https://thewoksoflife.com/takeout-egg-rolls/) diff --git a/src/sides/elote-street-corn.md b/content/sides/elote-street-corn.md similarity index 97% rename from src/sides/elote-street-corn.md rename to content/sides/elote-street-corn.md index 2daaab1..4259b1a 100644 --- a/src/sides/elote-street-corn.md +++ b/content/sides/elote-street-corn.md @@ -1,3 +1,7 @@ ++++ +title = "🌽 Elote (Street Corn)" ++++ + # 🌽 Elote (Street Corn) [Original recipe](https://www.seriouseats.com/recipes/2013/07/mexican-street-corn-elotes-recipe.html) diff --git a/src/sides/hard-boiled-eggs.md b/content/sides/hard-boiled-eggs.md similarity index 91% rename from src/sides/hard-boiled-eggs.md rename to content/sides/hard-boiled-eggs.md index 6b90895..00dc8ac 100644 --- a/src/sides/hard-boiled-eggs.md +++ b/content/sides/hard-boiled-eggs.md @@ -1,3 +1,7 @@ ++++ +title = "πŸ₯š Hard-Boiled Eggs" ++++ + # πŸ₯š Hard-Boiled Eggs [Original recipe](https://www.seriouseats.com/recipes/2009/10/perfect-boiled-eggs-recipe.html) diff --git a/src/sides/potato-salad.md b/content/sides/potato-salad.md similarity index 98% rename from src/sides/potato-salad.md rename to content/sides/potato-salad.md index 196bd85..9150f43 100644 --- a/src/sides/potato-salad.md +++ b/content/sides/potato-salad.md @@ -1,3 +1,7 @@ ++++ +title = "πŸ₯” Potato Salad" ++++ + # πŸ₯” Potato Salad [Original Recipe](https://www.seriouseats.com/classic-potato-salad-recipe) diff --git a/src/sides/refried-beans.md b/content/sides/refried-beans.md similarity index 96% rename from src/sides/refried-beans.md rename to content/sides/refried-beans.md index 2c22959..26299eb 100644 --- a/src/sides/refried-beans.md +++ b/content/sides/refried-beans.md @@ -1,3 +1,7 @@ ++++ +title = "🍲 Refried Beanss" ++++ + # 🍲 Refried Beanss ## Ingredients diff --git a/src/sides/spinach-dip.md b/content/sides/spinach-dip.md similarity index 95% rename from src/sides/spinach-dip.md rename to content/sides/spinach-dip.md index 0c4653b..4337b33 100644 --- a/src/sides/spinach-dip.md +++ b/content/sides/spinach-dip.md @@ -1,3 +1,7 @@ ++++ +title = "πŸ₯¬ Spinach Dip" ++++ + # πŸ₯¬ Spinach Dip ## Ingredients diff --git a/src/sides/watermelon-feta-salad.md b/content/sides/watermelon-feta-salad.md similarity index 90% rename from src/sides/watermelon-feta-salad.md rename to content/sides/watermelon-feta-salad.md index a62087c..c593498 100644 --- a/src/sides/watermelon-feta-salad.md +++ b/content/sides/watermelon-feta-salad.md @@ -1,3 +1,7 @@ ++++ +title = "πŸ‰ Watermelon Feta Arugula Salad" ++++ + # πŸ‰ Watermelon Feta Arugula Salad [Original recipe](https://www.seriouseats.com/recipes/2016/06/watermelon-feta-mint-salad-recipe.html) diff --git a/generate-summary.py b/generate-summary.py deleted file mode 100755 index 4113b99..0000000 --- a/generate-summary.py +++ /dev/null @@ -1,52 +0,0 @@ -#!/usr/bin/env python - -import os -import sys - -SUMMARY_MD_TEMPLATE = """# Summary - -[Readme](readme.md) - -{}""" - -if __name__ == "__main__": - if len(sys.argv) > 1: - if sys.argv[1] == "supports": - # sys.argv[2] is the renderer name - sys.exit(0) - - exclude_dirs = ("src/pics", "src") - - recipe_groups = {} - - for dirpath, dirnames, filenames in sorted(os.walk("src")): - if dirpath in exclude_dirs: - continue - _, groupname = os.path.split(dirpath) - recipe_groups[groupname] = filenames - - summary = "" - - for group in recipe_groups: - summary += "- [{}]()\n".format(group) - for recipe in sorted(recipe_groups[group]): - summary += " - [{recipename}]({group}/{recipename}.md)\n".format( - recipename=os.path.splitext(recipe)[0], group=group - ) - - output = SUMMARY_MD_TEMPLATE.format(summary) - - with open("src/SUMMARY.md", "w") as outfile: - outfile.write(output) - outfile.write("\n") - - # required for running as mdbook preprocessor - if not sys.stdin.isatty(): - import json - - data = sys.stdin.read() - # debug print what mdbook passes out on stderr - # print(data, file=sys.stderr) - if data: - context, book = json.loads(data) - json.dump(book, sys.stdout) diff --git a/scripts/hero-search.js b/scripts/hero-search.js deleted file mode 100644 index 857b362..0000000 --- a/scripts/hero-search.js +++ /dev/null @@ -1,13 +0,0 @@ -(function () { - // Open the search bar on every page load without focusing (avoids mobile keyboard pop-up) - document.addEventListener('DOMContentLoaded', function () { - var btn = document.getElementById('mdbook-search-toggle'); - var searchbar = document.getElementById('mdbook-searchbar'); - if (btn) { - btn.click(); - if (searchbar) { - setTimeout(function () { searchbar.blur(); }, 0); - } - } - }); -})(); diff --git a/scripts/update-favicon.js b/scripts/update-favicon.js deleted file mode 100644 index 79845d3..0000000 --- a/scripts/update-favicon.js +++ /dev/null @@ -1,20 +0,0 @@ -// sorry about how crappy this is :( - -// get the 3rd glyph in the main content and paste it into the favicon field -let main_content = document.getElementById("main-content"); - -let emoji = "πŸ₯˜"; - -for (let i = 0; i < main_content.children.length; i++) { - let child = main_content.children[i]; - if (child.tagName == "H1") { - let glyphs = Array.from(child.children[0].text); - emoji = glyphs[0]; - break; - } -} - -let elem = document.getElementById("favicon"); -let icon_href = `data:image/svg+xml,${emoji}`; - -elem.setAttribute("href", icon_href); diff --git a/src/preserves/moms-pickles.md b/src/preserves/moms-pickles.md deleted file mode 100644 index 284a55e..0000000 --- a/src/preserves/moms-pickles.md +++ /dev/null @@ -1,3 +0,0 @@ -# πŸ₯’ Mom's Pickles - -drawing diff --git a/src/readme.md b/src/readme.md deleted file mode 100644 index 7e44321..0000000 --- a/src/readme.md +++ /dev/null @@ -1,9 +0,0 @@ -# πŸ—‚οΈ Recipes - -Collection of cooking recipes I've been using over the years. - -Recipes are split into categories, see the side bar (☰) for table of contents! - -Source for this website is here: - -[https://github.com/noahp/recipes](https://github.com/noahp/recipes) diff --git a/src/pics/crispy-potatoes.jpg b/static/pics/crispy-potatoes.jpg similarity index 100% rename from src/pics/crispy-potatoes.jpg rename to static/pics/crispy-potatoes.jpg diff --git a/src/pics/focaccia.jpg b/static/pics/focaccia.jpg similarity index 100% rename from src/pics/focaccia.jpg rename to static/pics/focaccia.jpg diff --git a/src/pics/garlic-peeled.jpg b/static/pics/garlic-peeled.jpg similarity index 100% rename from src/pics/garlic-peeled.jpg rename to static/pics/garlic-peeled.jpg diff --git a/src/pics/garlic-unpeeled.jpg b/static/pics/garlic-unpeeled.jpg similarity index 100% rename from src/pics/garlic-unpeeled.jpg rename to static/pics/garlic-unpeeled.jpg diff --git a/src/pics/kimchi.jpg b/static/pics/kimchi.jpg similarity index 100% rename from src/pics/kimchi.jpg rename to static/pics/kimchi.jpg diff --git a/src/pics/moms-pickles.jpeg b/static/pics/moms-pickles.jpeg similarity index 100% rename from src/pics/moms-pickles.jpeg rename to static/pics/moms-pickles.jpeg diff --git a/src/pics/oiled-garlic.jpg b/static/pics/oiled-garlic.jpg similarity index 100% rename from src/pics/oiled-garlic.jpg rename to static/pics/oiled-garlic.jpg diff --git a/src/pics/popovers.jpg b/static/pics/popovers.jpg similarity index 100% rename from src/pics/popovers.jpg rename to static/pics/popovers.jpg diff --git a/src/pics/roasted-garlic.jpg b/static/pics/roasted-garlic.jpg similarity index 100% rename from src/pics/roasted-garlic.jpg rename to static/pics/roasted-garlic.jpg diff --git a/src/pics/trimmed-garlic.jpg b/static/pics/trimmed-garlic.jpg similarity index 100% rename from src/pics/trimmed-garlic.jpg rename to static/pics/trimmed-garlic.jpg diff --git a/src/pics/trimming-garlic.jpg b/static/pics/trimming-garlic.jpg similarity index 100% rename from src/pics/trimming-garlic.jpg rename to static/pics/trimming-garlic.jpg diff --git a/static/scripts/elasticlunr.min.js b/static/scripts/elasticlunr.min.js new file mode 100644 index 0000000..32cb1bc --- /dev/null +++ b/static/scripts/elasticlunr.min.js @@ -0,0 +1,10 @@ +/** + * elasticlunr - http://weixsong.github.io + * Lightweight full-text search engine in Javascript for browser search and offline search. - 0.9.5 + * + * Copyright (C) 2016 Oliver Nightingale + * Copyright (C) 2016 Wei Song + * MIT Licensed + * @license + */ +!function(){function e(e){if(null===e||"object"!=typeof e)return e;var t=e.constructor();for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t}var t=function(e){var n=new t.Index;return n.pipeline.add(t.trimmer,t.stopWordFilter,t.stemmer),e&&e.call(n,n),n};t.version="0.9.5",lunr=t,t.utils={},t.utils.warn=function(e){return function(t){e.console&&console.warn&&console.warn(t)}}(this),t.utils.toString=function(e){return void 0===e||null===e?"":e.toString()},t.EventEmitter=function(){this.events={}},t.EventEmitter.prototype.addListener=function(){var e=Array.prototype.slice.call(arguments),t=e.pop(),n=e;if("function"!=typeof t)throw new TypeError("last argument must be a function");n.forEach(function(e){this.hasHandler(e)||(this.events[e]=[]),this.events[e].push(t)},this)},t.EventEmitter.prototype.removeListener=function(e,t){if(this.hasHandler(e)){var n=this.events[e].indexOf(t);-1!==n&&(this.events[e].splice(n,1),0==this.events[e].length&&delete this.events[e])}},t.EventEmitter.prototype.emit=function(e){if(this.hasHandler(e)){var t=Array.prototype.slice.call(arguments,1);this.events[e].forEach(function(e){e.apply(void 0,t)},this)}},t.EventEmitter.prototype.hasHandler=function(e){return e in this.events},t.tokenizer=function(e){if(!arguments.length||null===e||void 0===e)return[];if(Array.isArray(e)){var n=e.filter(function(e){return null===e||void 0===e?!1:!0});n=n.map(function(e){return t.utils.toString(e).toLowerCase()});var i=[];return n.forEach(function(e){var n=e.split(t.tokenizer.seperator);i=i.concat(n)},this),i}return e.toString().trim().toLowerCase().split(t.tokenizer.seperator)},t.tokenizer.defaultSeperator=/[\s\-]+/,t.tokenizer.seperator=t.tokenizer.defaultSeperator,t.tokenizer.setSeperator=function(e){null!==e&&void 0!==e&&"object"==typeof e&&(t.tokenizer.seperator=e)},t.tokenizer.resetSeperator=function(){t.tokenizer.seperator=t.tokenizer.defaultSeperator},t.tokenizer.getSeperator=function(){return t.tokenizer.seperator},t.Pipeline=function(){this._queue=[]},t.Pipeline.registeredFunctions={},t.Pipeline.registerFunction=function(e,n){n in t.Pipeline.registeredFunctions&&t.utils.warn("Overwriting existing registered function: "+n),e.label=n,t.Pipeline.registeredFunctions[n]=e},t.Pipeline.getRegisteredFunction=function(e){return e in t.Pipeline.registeredFunctions!=!0?null:t.Pipeline.registeredFunctions[e]},t.Pipeline.warnIfFunctionNotRegistered=function(e){var n=e.label&&e.label in this.registeredFunctions;n||t.utils.warn("Function is not registered with pipeline. This may cause problems when serialising the index.\n",e)},t.Pipeline.load=function(e){var n=new t.Pipeline;return e.forEach(function(e){var i=t.Pipeline.getRegisteredFunction(e);if(!i)throw new Error("Cannot load un-registered function: "+e);n.add(i)}),n},t.Pipeline.prototype.add=function(){var e=Array.prototype.slice.call(arguments);e.forEach(function(e){t.Pipeline.warnIfFunctionNotRegistered(e),this._queue.push(e)},this)},t.Pipeline.prototype.after=function(e,n){t.Pipeline.warnIfFunctionNotRegistered(n);var i=this._queue.indexOf(e);if(-1===i)throw new Error("Cannot find existingFn");this._queue.splice(i+1,0,n)},t.Pipeline.prototype.before=function(e,n){t.Pipeline.warnIfFunctionNotRegistered(n);var i=this._queue.indexOf(e);if(-1===i)throw new Error("Cannot find existingFn");this._queue.splice(i,0,n)},t.Pipeline.prototype.remove=function(e){var t=this._queue.indexOf(e);-1!==t&&this._queue.splice(t,1)},t.Pipeline.prototype.run=function(e){for(var t=[],n=e.length,i=this._queue.length,o=0;n>o;o++){for(var r=e[o],s=0;i>s&&(r=this._queue[s](r,o,e),void 0!==r&&null!==r);s++);void 0!==r&&null!==r&&t.push(r)}return t},t.Pipeline.prototype.reset=function(){this._queue=[]},t.Pipeline.prototype.get=function(){return this._queue},t.Pipeline.prototype.toJSON=function(){return this._queue.map(function(e){return t.Pipeline.warnIfFunctionNotRegistered(e),e.label})},t.Index=function(){this._fields=[],this._ref="id",this.pipeline=new t.Pipeline,this.documentStore=new t.DocumentStore,this.index={},this.eventEmitter=new t.EventEmitter,this._idfCache={},this.on("add","remove","update",function(){this._idfCache={}}.bind(this))},t.Index.prototype.on=function(){var e=Array.prototype.slice.call(arguments);return this.eventEmitter.addListener.apply(this.eventEmitter,e)},t.Index.prototype.off=function(e,t){return this.eventEmitter.removeListener(e,t)},t.Index.load=function(e){e.version!==t.version&&t.utils.warn("version mismatch: current "+t.version+" importing "+e.version);var n=new this;n._fields=e.fields,n._ref=e.ref,n.documentStore=t.DocumentStore.load(e.documentStore),n.pipeline=t.Pipeline.load(e.pipeline),n.index={};for(var i in e.index)n.index[i]=t.InvertedIndex.load(e.index[i]);return n},t.Index.prototype.addField=function(e){return this._fields.push(e),this.index[e]=new t.InvertedIndex,this},t.Index.prototype.setRef=function(e){return this._ref=e,this},t.Index.prototype.saveDocument=function(e){return this.documentStore=new t.DocumentStore(e),this},t.Index.prototype.addDoc=function(e,n){if(e){var n=void 0===n?!0:n,i=e[this._ref];this.documentStore.addDoc(i,e),this._fields.forEach(function(n){var o=this.pipeline.run(t.tokenizer(e[n]));this.documentStore.addFieldLength(i,n,o.length);var r={};o.forEach(function(e){e in r?r[e]+=1:r[e]=1},this);for(var s in r){var u=r[s];u=Math.sqrt(u),this.index[n].addToken(s,{ref:i,tf:u})}},this),n&&this.eventEmitter.emit("add",e,this)}},t.Index.prototype.removeDocByRef=function(e){if(e&&this.documentStore.isDocStored()!==!1&&this.documentStore.hasDoc(e)){var t=this.documentStore.getDoc(e);this.removeDoc(t,!1)}},t.Index.prototype.removeDoc=function(e,n){if(e){var n=void 0===n?!0:n,i=e[this._ref];this.documentStore.hasDoc(i)&&(this.documentStore.removeDoc(i),this._fields.forEach(function(n){var o=this.pipeline.run(t.tokenizer(e[n]));o.forEach(function(e){this.index[n].removeToken(e,i)},this)},this),n&&this.eventEmitter.emit("remove",e,this))}},t.Index.prototype.updateDoc=function(e,t){var t=void 0===t?!0:t;this.removeDocByRef(e[this._ref],!1),this.addDoc(e,!1),t&&this.eventEmitter.emit("update",e,this)},t.Index.prototype.idf=function(e,t){var n="@"+t+"/"+e;if(Object.prototype.hasOwnProperty.call(this._idfCache,n))return this._idfCache[n];var i=this.index[t].getDocFreq(e),o=1+Math.log(this.documentStore.length/(i+1));return this._idfCache[n]=o,o},t.Index.prototype.getFields=function(){return this._fields.slice()},t.Index.prototype.search=function(e,n){if(!e)return[];var i=null;null!=n&&(i=JSON.stringify(n));var o=new t.Configuration(i,this.getFields()).get(),r=this.pipeline.run(t.tokenizer(e)),s={};for(var u in o){var a=this.fieldSearch(r,u,o),l=o[u].boost;for(var d in a)a[d]=a[d]*l;for(var d in a)d in s?s[d]+=a[d]:s[d]=a[d]}var c=[];for(var d in s)c.push({ref:d,score:s[d]});return c.sort(function(e,t){return t.score-e.score}),c},t.Index.prototype.fieldSearch=function(e,t,n){var i=n[t].bool,o=n[t].expand,r=n[t].boost,s=null,u={};return 0!==r?(e.forEach(function(e){var n=[e];1==o&&(n=this.index[t].expandToken(e));var r={};n.forEach(function(n){var o=this.index[t].getDocs(n),a=this.idf(n,t);if(s&&"AND"==i){var l={};for(var d in s)d in o&&(l[d]=o[d]);o=l}n==e&&this.fieldSearchStats(u,n,o);for(var d in o){var c=this.index[t].getTermFrequency(n,d),f=this.documentStore.getFieldLength(d,t),h=1;0!=f&&(h=1/Math.sqrt(f));var p=1;n!=e&&(p=.15*(1-(n.length-e.length)/n.length));var v=c*a*h*p;d in r?r[d]+=v:r[d]=v}},this),s=this.mergeScores(s,r,i)},this),s=this.coordNorm(s,u,e.length)):void 0},t.Index.prototype.mergeScores=function(e,t,n){if(!e)return t;if("AND"==n){var i={};for(var o in t)o in e&&(i[o]=e[o]+t[o]);return i}for(var o in t)o in e?e[o]+=t[o]:e[o]=t[o];return e},t.Index.prototype.fieldSearchStats=function(e,t,n){for(var i in n)i in e?e[i].push(t):e[i]=[t]},t.Index.prototype.coordNorm=function(e,t,n){for(var i in e)if(i in t){var o=t[i].length;e[i]=e[i]*o/n}return e},t.Index.prototype.toJSON=function(){var e={};return this._fields.forEach(function(t){e[t]=this.index[t].toJSON()},this),{version:t.version,fields:this._fields,ref:this._ref,documentStore:this.documentStore.toJSON(),index:e,pipeline:this.pipeline.toJSON()}},t.Index.prototype.use=function(e){var t=Array.prototype.slice.call(arguments,1);t.unshift(this),e.apply(this,t)},t.DocumentStore=function(e){this._save=null===e||void 0===e?!0:e,this.docs={},this.docInfo={},this.length=0},t.DocumentStore.load=function(e){var t=new this;return t.length=e.length,t.docs=e.docs,t.docInfo=e.docInfo,t._save=e.save,t},t.DocumentStore.prototype.isDocStored=function(){return this._save},t.DocumentStore.prototype.addDoc=function(t,n){this.hasDoc(t)||this.length++,this.docs[t]=this._save===!0?e(n):null},t.DocumentStore.prototype.getDoc=function(e){return this.hasDoc(e)===!1?null:this.docs[e]},t.DocumentStore.prototype.hasDoc=function(e){return e in this.docs},t.DocumentStore.prototype.removeDoc=function(e){this.hasDoc(e)&&(delete this.docs[e],delete this.docInfo[e],this.length--)},t.DocumentStore.prototype.addFieldLength=function(e,t,n){null!==e&&void 0!==e&&0!=this.hasDoc(e)&&(this.docInfo[e]||(this.docInfo[e]={}),this.docInfo[e][t]=n)},t.DocumentStore.prototype.updateFieldLength=function(e,t,n){null!==e&&void 0!==e&&0!=this.hasDoc(e)&&this.addFieldLength(e,t,n)},t.DocumentStore.prototype.getFieldLength=function(e,t){return null===e||void 0===e?0:e in this.docs&&t in this.docInfo[e]?this.docInfo[e][t]:0},t.DocumentStore.prototype.toJSON=function(){return{docs:this.docs,docInfo:this.docInfo,length:this.length,save:this._save}},t.stemmer=function(){var e={ational:"ate",tional:"tion",enci:"ence",anci:"ance",izer:"ize",bli:"ble",alli:"al",entli:"ent",eli:"e",ousli:"ous",ization:"ize",ation:"ate",ator:"ate",alism:"al",iveness:"ive",fulness:"ful",ousness:"ous",aliti:"al",iviti:"ive",biliti:"ble",logi:"log"},t={icate:"ic",ative:"",alize:"al",iciti:"ic",ical:"ic",ful:"",ness:""},n="[^aeiou]",i="[aeiouy]",o=n+"[^aeiouy]*",r=i+"[aeiou]*",s="^("+o+")?"+r+o,u="^("+o+")?"+r+o+"("+r+")?$",a="^("+o+")?"+r+o+r+o,l="^("+o+")?"+i,d=new RegExp(s),c=new RegExp(a),f=new RegExp(u),h=new RegExp(l),p=/^(.+?)(ss|i)es$/,v=/^(.+?)([^s])s$/,g=/^(.+?)eed$/,m=/^(.+?)(ed|ing)$/,y=/.$/,S=/(at|bl|iz)$/,x=new RegExp("([^aeiouylsz])\\1$"),w=new RegExp("^"+o+i+"[^aeiouwxy]$"),I=/^(.+?[^aeiou])y$/,b=/^(.+?)(ational|tional|enci|anci|izer|bli|alli|entli|eli|ousli|ization|ation|ator|alism|iveness|fulness|ousness|aliti|iviti|biliti|logi)$/,E=/^(.+?)(icate|ative|alize|iciti|ical|ful|ness)$/,D=/^(.+?)(al|ance|ence|er|ic|able|ible|ant|ement|ment|ent|ou|ism|ate|iti|ous|ive|ize)$/,F=/^(.+?)(s|t)(ion)$/,_=/^(.+?)e$/,P=/ll$/,k=new RegExp("^"+o+i+"[^aeiouwxy]$"),z=function(n){var i,o,r,s,u,a,l;if(n.length<3)return n;if(r=n.substr(0,1),"y"==r&&(n=r.toUpperCase()+n.substr(1)),s=p,u=v,s.test(n)?n=n.replace(s,"$1$2"):u.test(n)&&(n=n.replace(u,"$1$2")),s=g,u=m,s.test(n)){var z=s.exec(n);s=d,s.test(z[1])&&(s=y,n=n.replace(s,""))}else if(u.test(n)){var z=u.exec(n);i=z[1],u=h,u.test(i)&&(n=i,u=S,a=x,l=w,u.test(n)?n+="e":a.test(n)?(s=y,n=n.replace(s,"")):l.test(n)&&(n+="e"))}if(s=I,s.test(n)){var z=s.exec(n);i=z[1],n=i+"i"}if(s=b,s.test(n)){var z=s.exec(n);i=z[1],o=z[2],s=d,s.test(i)&&(n=i+e[o])}if(s=E,s.test(n)){var z=s.exec(n);i=z[1],o=z[2],s=d,s.test(i)&&(n=i+t[o])}if(s=D,u=F,s.test(n)){var z=s.exec(n);i=z[1],s=c,s.test(i)&&(n=i)}else if(u.test(n)){var z=u.exec(n);i=z[1]+z[2],u=c,u.test(i)&&(n=i)}if(s=_,s.test(n)){var z=s.exec(n);i=z[1],s=c,u=f,a=k,(s.test(i)||u.test(i)&&!a.test(i))&&(n=i)}return s=P,u=c,s.test(n)&&u.test(n)&&(s=y,n=n.replace(s,"")),"y"==r&&(n=r.toLowerCase()+n.substr(1)),n};return z}(),t.Pipeline.registerFunction(t.stemmer,"stemmer"),t.stopWordFilter=function(e){return e&&t.stopWordFilter.stopWords[e]!==!0?e:void 0},t.clearStopWords=function(){t.stopWordFilter.stopWords={}},t.addStopWords=function(e){null!=e&&Array.isArray(e)!==!1&&e.forEach(function(e){t.stopWordFilter.stopWords[e]=!0},this)},t.resetStopWords=function(){t.stopWordFilter.stopWords=t.defaultStopWords},t.defaultStopWords={"":!0,a:!0,able:!0,about:!0,across:!0,after:!0,all:!0,almost:!0,also:!0,am:!0,among:!0,an:!0,and:!0,any:!0,are:!0,as:!0,at:!0,be:!0,because:!0,been:!0,but:!0,by:!0,can:!0,cannot:!0,could:!0,dear:!0,did:!0,"do":!0,does:!0,either:!0,"else":!0,ever:!0,every:!0,"for":!0,from:!0,get:!0,got:!0,had:!0,has:!0,have:!0,he:!0,her:!0,hers:!0,him:!0,his:!0,how:!0,however:!0,i:!0,"if":!0,"in":!0,into:!0,is:!0,it:!0,its:!0,just:!0,least:!0,let:!0,like:!0,likely:!0,may:!0,me:!0,might:!0,most:!0,must:!0,my:!0,neither:!0,no:!0,nor:!0,not:!0,of:!0,off:!0,often:!0,on:!0,only:!0,or:!0,other:!0,our:!0,own:!0,rather:!0,said:!0,say:!0,says:!0,she:!0,should:!0,since:!0,so:!0,some:!0,than:!0,that:!0,the:!0,their:!0,them:!0,then:!0,there:!0,these:!0,they:!0,"this":!0,tis:!0,to:!0,too:!0,twas:!0,us:!0,wants:!0,was:!0,we:!0,were:!0,what:!0,when:!0,where:!0,which:!0,"while":!0,who:!0,whom:!0,why:!0,will:!0,"with":!0,would:!0,yet:!0,you:!0,your:!0},t.stopWordFilter.stopWords=t.defaultStopWords,t.Pipeline.registerFunction(t.stopWordFilter,"stopWordFilter"),t.trimmer=function(e){if(null===e||void 0===e)throw new Error("token should not be undefined");return e.replace(/^\W+/,"").replace(/\W+$/,"")},t.Pipeline.registerFunction(t.trimmer,"trimmer"),t.InvertedIndex=function(){this.root={docs:{},df:0}},t.InvertedIndex.load=function(e){var t=new this;return t.root=e.root,t},t.InvertedIndex.prototype.addToken=function(e,t,n){for(var n=n||this.root,i=0;i<=e.length-1;){var o=e[i];o in n||(n[o]={docs:{},df:0}),i+=1,n=n[o]}var r=t.ref;n.docs[r]?n.docs[r]={tf:t.tf}:(n.docs[r]={tf:t.tf},n.df+=1)},t.InvertedIndex.prototype.hasToken=function(e){if(!e)return!1;for(var t=this.root,n=0;n0&&t.push(e);for(var i in n)"docs"!==i&&"df"!==i&&this.expandToken(e+i,t,n[i]);return t},t.InvertedIndex.prototype.toJSON=function(){return{root:this.root}},t.Configuration=function(e,n){var e=e||"";if(void 0==n||null==n)throw new Error("fields should not be null");this.config={};var i;try{i=JSON.parse(e),this.buildUserConfig(i,n)}catch(o){t.utils.warn("user configuration parse failed, will use default configuration"),this.buildDefaultConfig(n)}},t.Configuration.prototype.buildDefaultConfig=function(e){this.reset(),e.forEach(function(e){this.config[e]={boost:1,bool:"OR",expand:!1}},this)},t.Configuration.prototype.buildUserConfig=function(e,n){var i="OR",o=!1;if(this.reset(),"bool"in e&&(i=e.bool||i),"expand"in e&&(o=e.expand||o),"fields"in e)for(var r in e.fields)if(n.indexOf(r)>-1){var s=e.fields[r],u=o;void 0!=s.expand&&(u=s.expand),this.config[r]={boost:s.boost||0===s.boost?s.boost:1,bool:s.bool||i,expand:u}}else t.utils.warn("field name in user configuration not found in index instance fields");else this.addAllFields2UserConfig(i,o,n)},t.Configuration.prototype.addAllFields2UserConfig=function(e,t,n){n.forEach(function(n){this.config[n]={boost:1,bool:e,expand:t}},this)},t.Configuration.prototype.get=function(){return this.config},t.Configuration.prototype.reset=function(){this.config={}},lunr.SortedSet=function(){this.length=0,this.elements=[]},lunr.SortedSet.load=function(e){var t=new this;return t.elements=e,t.length=e.length,t},lunr.SortedSet.prototype.add=function(){var e,t;for(e=0;e1;){if(r===e)return o;e>r&&(t=o),r>e&&(n=o),i=n-t,o=t+Math.floor(i/2),r=this.elements[o]}return r===e?o:-1},lunr.SortedSet.prototype.locationFor=function(e){for(var t=0,n=this.elements.length,i=n-t,o=t+Math.floor(i/2),r=this.elements[o];i>1;)e>r&&(t=o),r>e&&(n=o),i=n-t,o=t+Math.floor(i/2),r=this.elements[o];return r>e?o:e>r?o+1:void 0},lunr.SortedSet.prototype.intersect=function(e){for(var t=new lunr.SortedSet,n=0,i=0,o=this.length,r=e.length,s=this.elements,u=e.elements;;){if(n>o-1||i>r-1)break;s[n]!==u[i]?s[n]u[i]&&i++:(t.add(s[n]),n++,i++)}return t},lunr.SortedSet.prototype.clone=function(){var e=new lunr.SortedSet;return e.elements=this.toArray(),e.length=e.elements.length,e},lunr.SortedSet.prototype.union=function(e){var t,n,i;this.length>=e.length?(t=this,n=e):(t=e,n=this),i=t.clone();for(var o=0,r=n.toArray();o' + + '' + emoji + '' + ); +} diff --git a/static/style.css b/static/style.css new file mode 100644 index 0000000..afea40f --- /dev/null +++ b/static/style.css @@ -0,0 +1,287 @@ +/* ── Variables ─────────────────────────────────────────────────────── */ +:root { + --bg: #f5f7fa; + --bg2: #eaecf0; + --fg: #1c2128; + --fg2: #57606a; + --accent: #3d6ea8; + --border: #d0d7de; + --search-bg: #ffffff; + --search-shadow: rgba(0,0,0,.08); + --link: #3d6ea8; + --link-hover: #2d5490; + --card-bg: #edf0f5; + --card-hover: #e2e7ef; +} + +@media (prefers-color-scheme: dark) { + :root { + --bg: #131720; + --bg2: #1c2233; + --fg: #dde3ec; + --fg2: #8892a4; + --accent: #7aa2d4; + --border: #2a3447; + --search-bg: #1a2030; + --search-shadow: rgba(0,0,0,.35); + --link: #7aa2d4; + --link-hover: #a0bfe6; + --card-bg: #182030; + --card-hover: #1e2a3d; + } +} + +/* ── Reset ─────────────────────────────────────────────────────────── */ +*, *::before, *::after { box-sizing: border-box; } +body { + margin: 0; + font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; + font-size: 16px; + line-height: 1.6; + background: var(--bg); + color: var(--fg); +} +a { color: var(--link); text-decoration: none; } +a:hover { color: var(--link-hover); text-decoration: underline; } + +/* ── Header ────────────────────────────────────────────────────────── */ +header { + position: sticky; + top: 0; + z-index: 100; + background: var(--bg); + border-bottom: 1px solid var(--border); +} + +.header-bar { + display: flex; + align-items: center; + gap: 12px; + padding: 8px 20px; + flex-wrap: wrap; +} + +.site-title { + font-weight: 700; + font-size: 1.1rem; + color: var(--fg); + text-decoration: none; + white-space: nowrap; +} +.site-title:hover { color: var(--accent); text-decoration: none; } + +.cat-nav { + display: flex; + gap: 4px; + flex-wrap: wrap; + flex: 1; +} +.cat-nav a { + padding: 3px 10px; + border-radius: 999px; + font-size: 0.88rem; + color: var(--fg2); + transition: background 0.15s, color 0.15s; + white-space: nowrap; +} +.cat-nav a:hover { + background: var(--bg2); + color: var(--fg); + text-decoration: none; +} + +.github-link { + color: var(--fg2); + line-height: 0; + margin-left: auto; +} +.github-link:hover { color: var(--fg); text-decoration: none; } + +/* ── Search strip ──────────────────────────────────────────────────── */ +.search-strip { + padding: 8px 20px 10px; + background: var(--bg); + position: relative; +} + +#search-input { + width: 100%; + padding: 12px 18px; + font-size: 1.05rem; + border: 1px solid var(--border); + border-radius: 8px; + background: var(--search-bg); + color: var(--fg); + outline: none; + transition: box-shadow 0.2s; +} +#search-input:focus { + box-shadow: 0 0 0 3px rgba(61, 110, 168, 0.22); + border-color: var(--accent); +} + +.search-results { + position: absolute; + top: calc(100% - 4px); + left: 20px; + right: 20px; + margin: 0; + padding: 6px 0; + list-style: none; + background: var(--search-bg); + border: 1px solid var(--border); + border-radius: 0 0 8px 8px; + box-shadow: 0 6px 20px var(--search-shadow); + max-height: 60vh; + overflow-y: auto; + z-index: 200; +} +.search-results.hidden { display: none; } +.search-results li a { + display: block; + padding: 8px 18px; + color: var(--fg); + font-size: 0.95rem; +} +.search-results li a:hover { + background: var(--bg2); + text-decoration: none; +} +.search-results li .teaser { + display: block; + font-size: 0.8rem; + color: var(--fg2); + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; +} + +/* ── Main content ──────────────────────────────────────────────────── */ +#main-content { + max-width: 800px; + margin: 0 auto; + padding: 28px 20px 60px; +} + +/* ── Home page ─────────────────────────────────────────────────────── */ +.home-tagline { + color: var(--fg2); + margin-bottom: 24px; +} + +.category-grid { + display: grid; + grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); + gap: 12px; +} + +.category-card { + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; + gap: 4px; + padding: 18px 12px; + background: var(--card-bg); + border: 1px solid var(--border); + border-radius: 10px; + text-decoration: none; + transition: background 0.15s, transform 0.1s; +} +.category-card:hover { + background: var(--card-hover); + transform: translateY(-1px); + text-decoration: none; +} +.cat-name { + font-weight: 600; + color: var(--fg); + text-transform: capitalize; +} +.cat-count { + font-size: 0.82rem; + color: var(--fg2); +} + +/* ── Section page ──────────────────────────────────────────────────── */ +.section-page h1 { + text-transform: capitalize; + margin-bottom: 16px; +} + +.recipe-list { + list-style: none; + padding: 0; + margin: 0; +} +.recipe-list li { + border-bottom: 1px solid var(--border); +} +.recipe-list li:last-child { border-bottom: none; } +.recipe-list li a { + display: block; + padding: 10px 4px; + font-size: 1rem; + color: var(--fg); +} +.recipe-list li a:hover { + color: var(--accent); + text-decoration: none; + padding-left: 8px; + transition: padding 0.1s; +} + +/* ── Recipe page ───────────────────────────────────────────────────── */ +.breadcrumb { + font-size: 0.85rem; + color: var(--fg2); + margin-bottom: 24px; +} +.breadcrumb a { color: var(--fg2); } +.breadcrumb a:hover { color: var(--accent); text-decoration: none; } + +.recipe-content h1 { margin-top: 0; } +.recipe-content h2 { + margin-top: 2em; + padding-bottom: 4px; + border-bottom: 1px solid var(--border); +} +.recipe-content h3 { margin-top: 1.5em; } +.recipe-content ul, .recipe-content ol { + padding-left: 1.5em; +} +.recipe-content li { margin-bottom: 4px; } +.recipe-content blockquote { + margin: 1em 0; + padding: 8px 16px; + border-left: 3px solid var(--accent); + background: var(--bg2); + border-radius: 0 4px 4px 0; + color: var(--fg2); +} +.recipe-content img { + max-width: 100%; + height: auto; + border-radius: 6px; +} +.recipe-content table { + border-collapse: collapse; + width: 100%; + margin: 1em 0; +} +.recipe-content th, .recipe-content td { + border: 1px solid var(--border); + padding: 6px 12px; + text-align: left; +} +.recipe-content th { background: var(--bg2); } + +.page-footer { + margin-top: 40px; + padding-top: 16px; + border-top: 1px solid var(--border); + font-size: 0.85rem; + color: var(--fg2); +} +.page-footer a { color: var(--fg2); } +.page-footer a:hover { color: var(--accent); } diff --git a/templates/base.html b/templates/base.html new file mode 100644 index 0000000..17427dc --- /dev/null +++ b/templates/base.html @@ -0,0 +1,48 @@ + + + + + + {% block title %}{{ config.title }}{% endblock %} + + + + + +
+
+ {{ config.title }} + + + + +
+
+ + +
+
+ +
+ {% block content %}{% endblock %} +
+ + + + + + diff --git a/templates/index.html b/templates/index.html new file mode 100644 index 0000000..da41d08 --- /dev/null +++ b/templates/index.html @@ -0,0 +1,16 @@ +{% extends "base.html" %} + +{% block content %} +
+

A personal collection of recipes.

+
+ {% for cat in config.extra.categories %} + {% set sec = get_section(path=cat ~ "/_index.md") %} + + {{ sec.title }} + {{ sec.pages | length }} + + {% endfor %} +
+
+{% endblock %} diff --git a/templates/page.html b/templates/page.html new file mode 100644 index 0000000..3fa3f00 --- /dev/null +++ b/templates/page.html @@ -0,0 +1,26 @@ +{% extends "base.html" %} + +{% block title %}{{ page.title }} β€” {{ config.title }}{% endblock %} + +{% block content %} +
+ + +
+ {{ page.content | safe }} +
+ + +
+{% endblock %} diff --git a/templates/section.html b/templates/section.html new file mode 100644 index 0000000..9469517 --- /dev/null +++ b/templates/section.html @@ -0,0 +1,14 @@ +{% extends "base.html" %} + +{% block title %}{{ section.title }} β€” {{ config.title }}{% endblock %} + +{% block content %} +
+

{{ section.title }}

+ +
+{% endblock %} diff --git a/theme/custom.css b/theme/custom.css deleted file mode 100644 index 71b2120..0000000 --- a/theme/custom.css +++ /dev/null @@ -1,16 +0,0 @@ -/* Always-visible prominent search strip */ -#mdbook-search-wrapper { - padding: 10px 20px 4px; - border-bottom: 1px solid var(--searchbar-border-color); -} - -#mdbook-search-wrapper .searchbar-outer { - max-width: none; -} - -#mdbook-searchbar { - font-size: 1.1rem; - padding: 14px 20px; - border-radius: 8px; - margin-block-start: 0; -} diff --git a/wrapper.sh b/wrapper.sh deleted file mode 100755 index 2401cb2..0000000 --- a/wrapper.sh +++ /dev/null @@ -1,26 +0,0 @@ -#!/usr/bin/env sh - -# Extremely stupid, but i couldn't solve how to: -# 1. get mdbook to run a pre-build script πŸ™„ -# 2. get docker-compose to forward a full command through to /bin/sh inside the -# container (why tho) -# -# So this just runs the generate-summary command before executing mdbook. - -set -ex - -python3 generate-summary.py - -# if arg is "build", just build the book -if [ "$1" = "build" ]; then - mdbook build - - # wipe off the .html extension - perl -i -p -e 's{href="index.html"}{href="."}g' book/toc.js - perl -i -p -e 's{(href="[a-zA-Z0-9.][^"]+)\.html"}{$1"}g' book/toc.js - find book/ -name *.html | xargs perl -i -p -e 's{href="index.html"}{href="."}g' - find book/ -name *.html | xargs perl -i -p -e 's{(href="[a-zA-Z0-9.][^"]+)\.html"}{$1"}g' - -else - mdbook serve --hostname '0.0.0.0' -fi