From f3634c9cdfaba58bafa9aa3917a23b299f586285 Mon Sep 17 00:00:00 2001 From: scottj Date: Fri, 20 Aug 2021 17:55:41 -0700 Subject: setup recipe index page, added js to search recipes, tweaks to css, updates to recipes including new image file --- build_posts.rb | 11 +-- build_recipe_directory.rb | 6 +- build_website.sh | 4 +- content/main-pages/index.md | 2 +- content/main-pages/recipes.md | 62 ++++++++++++++++ content/posts/banana-muffins.md | 38 +++++++--- content/posts/maple-bread.md | 4 +- head.html.erb | 5 ++ images/recipe-images/banana-muffin.JPG | Bin 0 -> 224676 bytes output/about.html | 2 + output/banana-muffins.md.html | 35 +++++++-- output/index.html | 4 +- output/maple-bread.md.html | 2 + output/recipes.html | 130 ++++++++++++++++----------------- recipe-directory-template.html.erb | 7 +- recipe-template.html.erb | 7 +- style/style.css | 56 ++++++++++++++ template.html.erb | 7 +- 18 files changed, 265 insertions(+), 117 deletions(-) create mode 100644 content/main-pages/recipes.md create mode 100644 head.html.erb create mode 100755 images/recipe-images/banana-muffin.JPG diff --git a/build_posts.rb b/build_posts.rb index 53a18ac..ec03b77 100644 --- a/build_posts.rb +++ b/build_posts.rb @@ -25,7 +25,6 @@ def filename return file end - i = 0 while (i < content.length) @content = content[i] @@ -36,12 +35,4 @@ while (i < content.length) f.write(template.result) end i += 1 -end - -=begin -filename.each do |file| - File.open(file, 'w') do |f| - f.write(template.result) - end -end -=end \ No newline at end of file +end \ No newline at end of file diff --git a/build_recipe_directory.rb b/build_recipe_directory.rb index 433e179..de61f4f 100644 --- a/build_recipe_directory.rb +++ b/build_recipe_directory.rb @@ -7,9 +7,9 @@ end def content output = "" - Dir.foreach("./content/posts") do |post_filename| - if post_filename.include?("md") - output.concat(Kramdown::Document.new(File.read("./content/posts/#{post_filename}")).to_html) + Dir.foreach("./content/main-pages") do |post_filename| + if post_filename.include?("recipes.md") + output.concat(Kramdown::Document.new(File.read("./content/main-pages/#{post_filename}")).to_html) end end return output diff --git a/build_website.sh b/build_website.sh index f9b062b..e153716 100755 --- a/build_website.sh +++ b/build_website.sh @@ -2,5 +2,5 @@ bin/build_index bin/build_about -bin/build_blog -bin/build_posts \ No newline at end of file +bin/build_posts +bin/build_recipe_directory \ No newline at end of file diff --git a/content/main-pages/index.md b/content/main-pages/index.md index 1b6d0a0..e04e393 100644 --- a/content/main-pages/index.md +++ b/content/main-pages/index.md @@ -6,7 +6,7 @@
- +
diff --git a/content/main-pages/recipes.md b/content/main-pages/recipes.md new file mode 100644 index 0000000..c31044f --- /dev/null +++ b/content/main-pages/recipes.md @@ -0,0 +1,62 @@ + + +
+ +
+ + diff --git a/content/posts/banana-muffins.md b/content/posts/banana-muffins.md index e09b03a..096a4f1 100644 --- a/content/posts/banana-muffins.md +++ b/content/posts/banana-muffins.md @@ -1,14 +1,17 @@ -# Vegan Banana Loaf / Muffins {#recipe-title} +#Vegan Banana Loaf / Muffins {#recipe-title}
{::nomarkdown} - + {:/}
-## Ingredients +##Description +This recipe is adapted from my great grandmother’s Banana Loaf recipe. It Works great as a loaf or muffins. No need for a proper egg substitute in this recipe as the bananas accomplish this on their own. For the oil I strongly recommend using Coconut Oil as it yields a buttery flavour and texture. + +##Ingredients - 1/4 cup Oil (Coconut or other) - 1 cup Sugar - 3 or 4 bananas (depending on size: 3 large or 4 small) Approx: 1 cup @@ -16,14 +19,31 @@ - 1 cup whole wheat flour - 1/4 tsp salt - 1 tsp baking soda -- Vegan 'Dairy Free' chocolate chips (optional) +- Vegan 'Dairy Free' chocolate chips (optional)[^2] ##Instructions -1. Heat oven to 350 degrees fahrenheit. -2. Cream oil and sugar. -3. Add mashed banana and baking soda. -4. Add flour and salt and mix until combined. -5. Add chocolate chips if desired. +1. Heat oven to 350 degrees Fahrenheit. +2. Add Oil and Sugar to large mixing bowl. +3. Cream oil and sugar. +4. Mash Bananas in separate smaller bowl. +5. Add mashed banana and baking soda to the oil and sugar mix. +6. Add flour and salt. +7. Mix ingredients by hand until combined. Avoid over-mixing. +8. Add chocolate chips if desired. +9. Grease Muffin Pan or Loaf pan with Coconut Oil. +10. Add muffin batter to pan. +11. Bake until brown on top and firm to the touch.[^1] + +[^1]:For muffins bake approx 25-30 minutes. + For Loaf bake approx 50-60 minutes. + + + Note: Your cooking time may vary based on your oven. + +[^2]:For Vegan chocolate chips I recommend reading the ingredients rather than looking for ones that are advertised as Vegan. Most semi-sweet chocolate chips other than ‘Chipits’ are dairy free. Bakers semi-sweet is a good option. Enjoy Life are a good option if you need to avoid other potential allergens like soy. Personally I find them overpriced compared to grocery store house brands or Bakers. + +* footnotes will be placed here. This line is necessary +{:footnotes}
diff --git a/content/posts/maple-bread.md b/content/posts/maple-bread.md index 8ba0851..7544047 100644 --- a/content/posts/maple-bread.md +++ b/content/posts/maple-bread.md @@ -1,4 +1,4 @@ -# Quick Vegan Whole Wheat Maple Bread {#recipe-title} +#Quick Vegan Whole Wheat Maple Bread {#recipe-title}
@@ -11,7 +11,7 @@ ##Description This recipe is for a single loaf of whole wheat bread. This recipe is quick and easy! We will use the oven to do our dough rise which will save both time and effort. -## Ingredients (1 loaf) +##Ingredients (1 loaf) - 1/2 Tablespoon Active Dry Yeast or Traditional Yeast - 1/3 cup Maple Syrup or Sugar (any form of sugar will work) - 1 and 1/2 Cups or 425ml Warm Water diff --git a/head.html.erb b/head.html.erb new file mode 100644 index 0000000..54a1636 --- /dev/null +++ b/head.html.erb @@ -0,0 +1,5 @@ + + Pantry of Plants + + + diff --git a/images/recipe-images/banana-muffin.JPG b/images/recipe-images/banana-muffin.JPG new file mode 100755 index 0000000..588729a Binary files /dev/null and b/images/recipe-images/banana-muffin.JPG differ diff --git a/output/about.html b/output/about.html index 6dc92f2..4fb6ec2 100644 --- a/output/about.html +++ b/output/about.html @@ -1,9 +1,11 @@ + Pantry of Plants +
- +
diff --git a/output/maple-bread.md.html b/output/maple-bread.md.html index 6bceebb..3d02bd1 100644 --- a/output/maple-bread.md.html +++ b/output/maple-bread.md.html @@ -1,9 +1,11 @@ + Pantry of Plants +