recipease file format
The file format is a simple JSON format - an example of which is below:
{
"title":"Synapticloop's recipe book",
"image":"src/test/resources/images/recipes.jpg",
"subTitle":"\"Recipes that we have collected and tested from many of our favourite sources and make available to everybody\"",
"tocTitle":"Table of Contents",
"ingredientsTitle": "Ingredients",
"notesTitle": "Notes from the field...",
"directionsTitle": "Directions",
"sections": [
{
"title": "Breakfast",
"image": "./src/test/resources/images/breakfast.jpg",
"recipes": [
{ "import": "breakfast/pancakes.json" }
]
},
{
"title": "Morning Tea",
"image": "./src/test/resources/images/morning-tea.jpg",
"recipes": [
{ "import": "morning-tea/scones.json"},
{ "import": "morning-tea/raspberry-muffins.json"},
{ "import": "morning-tea/banana-bread.json"},
{ "import": "morning-tea/anzac-biscuits.json"},
{ "import": "morning-tea/anzac-biscuits-alternate.json"},
{ "import": "morning-tea/financiers.json"}
]
},
{
"title": "Entrees",
"image": "src/test/resources/images/entrees.jpg",
"recipes": [
{ "import": "entrees/cheese-souffle.json"}
]
},
{
"title": "Sauces",
"image": "src/test/resources/images/sauces.jpg",
"recipes": [
{ "import": "sauces/applesauce.json" },
{ "import": "sauces/teriyaki-sauce.json" },
{ "import": "sauces/mint-jelly.json" },
{ "import": "sauces/peanut-sauce.json" },
{ "import": "sauces/bechamel-sauce.json" },
{ "import": "sauces/white-sauce.json" }
]
},
{
"title": "Sides",
"image": "src/test/resources/images/sides.jpg",
"recipes": [
{ "import": "sides/puree-of-potato-and-celeriac.json" },
{ "import": "sides/glazed-carrots-with-thyme.json" },
{ "import": "sides/sweet-potato-gratin.json" },
{ "import": "sides/aubergine-parmigiana.json" }
]
},
{
"title": "Hors D'Oeuvres",
"image": "src/test/resources/images/hors-doeuvres.jpg",
"recipes": [
{ "import": "hors-doeuvres/sausage-rolls.json" }
]
},
{
"title": "Main Courses",
"image": "src/test/resources/images/mains.jpg",
"recipes": [
{ "import": "main-courses/baked-ham.json" },
{ "import": "main-courses/mushroom-risotto.json" },
{ "import": "main-courses/curry-in-a-hurry.json" },
{ "import": "main-courses/roast-turkey-with-pan-gravy.json" },
{ "import": "main-courses/bolognese-sauce.json" },
{ "import": "main-courses/lasagne.json" },
{ "import": "main-courses/gnudi.json" }
]
},
{
"title": "Cakes",
"image": "./src/test/resources/images/cakes.jpg",
"recipes": [
{ "import": "cakes/lemon-polenta-cake.json" },
{ "import": "cakes/torta-caprese.json" },
{ "import": "cakes/carrot-cake.json" },
{ "import": "cakes/chocolate-raspberry-loaf-cake.json" },
{ "import": "cakes/greek-yogurt-chocolate-cake.json" },
{ "import": "cakes/polenta-almond-and-orange-cake.json" }
]
}
]
}
keys
For each of the keys on the root recipease object:
- title This is the title of the recipe book - this defaults to My Delicious Un-Named Recipes
- image (optional) This is the image to place on the front page of the book
- subTitle (optional) This is the sub-title for the recipe book
- tocTitle (optional) This is the table of contents name that will be output - default Table of Contents
- ingredientsTitle (optional) This is the title that goes before the list of ingredients - default Ingredients
- notesTitle (optional) This is the title that goes before the list of notes - default Notes
- directionsTitle (optional) This is the title that goes before the list of directions - default Directions
- sections An array of groupings for the recipe book.
Why so many optional JSON keys?
Simple - because we know that not everybody speaks english, and for those that do some people want to customise the things that they can.
sections
Sections are a way to break up your recipe book into multiple groups, we break it up by meal type - but they can be of any grouping that you want.
- title The title for the section - if not set, this will default to Random deliciousness
- image (optional) This is the image to place on the first page of the section
- recipes All of the delicious recipes that belong in this section
Recipes
All of the recipes are import
ed from different files, see the recipe-file-format.html for more details.