](../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
[](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
-
+
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
+
+
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
-
+
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,`;
-
-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
-
-
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;nA personal collection of recipes.
+