{"id":21429406,"url":"https://github.com/nystudio107/recipe","last_synced_at":"2025-08-25T06:41:05.053Z","repository":{"id":57029565,"uuid":"57440555","full_name":"nystudio107/recipe","owner":"nystudio107","description":"DEPRECATED A comprehensive recipe FieldType for Craft CMS that includes metric/imperial conversion, portion calculation, and JSON-LD microdata support","archived":false,"fork":false,"pushed_at":"2019-01-01T23:27:23.000Z","size":687,"stargazers_count":37,"open_issues_count":3,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2023-07-15T14:35:09.304Z","etag":null,"topics":["craft-plugin","craftcms","recipe"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nystudio107.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-04-30T12:17:50.000Z","updated_at":"2023-07-15T14:35:09.305Z","dependencies_parsed_at":"2022-08-23T18:50:15.966Z","dependency_job_id":null,"html_url":"https://github.com/nystudio107/recipe","commit_stats":null,"previous_names":[],"tags_count":4,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nystudio107%2Frecipe","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nystudio107%2Frecipe/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nystudio107%2Frecipe/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nystudio107%2Frecipe/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nystudio107","download_url":"https://codeload.github.com/nystudio107/recipe/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225970900,"owners_count":17553413,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["craft-plugin","craftcms","recipe"],"created_at":"2024-11-22T22:17:38.614Z","updated_at":"2024-11-22T22:17:39.391Z","avatar_url":"https://github.com/nystudio107.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![No Maintenance Intended](http://unmaintained.tech/badge.svg)](http://unmaintained.tech/)\n\n# DEPRECATED\n\nThis Craft CMS 2.x plugin is no longer supported, but it is fully functional, and you may continue to use it as you see fit. The license also allows you to fork it and make changes as needed for legacy support reasons.\n\nThe Craft CMS 3.x version of this plugin can be found here: [craft-recipe](https://github.com/nystudio107/craft-recipe) and can also be installed via the Craft Plugin Store in the Craft CP.\n\n# Recipe plugin for Craft CMS\n\nA recipe FieldType for Craft CMS that includes microdata support\n\nRelated: [Recipe for Craft 3.x](https://github.com/nystudio107/craft3-recipe)\n\n![Screenshot](resources/screenshots/recipe01.png)\n\n## Installation\n\nTo install Recipe, follow these steps:\n\n1. Download \u0026 unzip the file and place the `recipe` directory into your `craft/plugins` directory\n2.  -OR- do a `git clone https://github.com/nystudio107/recipe.git` directly into your `craft/plugins` folder.  You can then update it with `git pull`\n3.  -OR- install with Composer via `composer require nystudio107/recipe`\n4. Install plugin in the Craft Control Panel under Settings \u003e Plugins\n5. The plugin folder should be named `recipe` for Craft to see it.  GitHub recently started appending `-master` (the branch name) to the name of the folder for zip file downloads.\n\nRecipe works on Craft 2.4.x, Craft 2.5.x, and Craft 2.6.x.\n\n## Recipe Overview\n\nRecipe adds a 'Recipe' FieldType for Craft CMS that you can add to any of your Sections.\n\nIn encapsulates everything you need for a recipe, including the ingredients, a photo of the recipe, directions, cooking time, ratings, and even nutritional information. It handles converting between Imperial and Metric units, outputs 'pretty' fractions for Imperial units, and can output correct ingredient portions for any number of servings.\n\nRecipe also generates the [JSON-LD microdata](https://developers.google.com/structured-data/) for your recipes if you have the [SEOmatic plugin](https://github.com/nystudio107/seomatic) installed, which allows it to be displayed in the [Google knowledge panel](https://developers.google.com/structured-data/rich-snippets/recipes) for search results.\n\nWe hope Recipe makes it easier for you to create and share some yummy recipes!\n\n## Configuring Recipe\n\nCreate a Recipe field via **Settings-\u003eFields** and you can set the Asset Sources that are used for the recipe images\n\n## Using Recipe\n\nOnce you have created the Recipe field, add it to your Section Entry Types, and fill in what recipe information is appropriate.  Nothing other than the name is required, so feel free to leave anything blank that you're not using.\n\n## Using Recipe in your Templates\n\nTo display information about a recipe in your templates, you just use familiar Twig code.  Let's assume the field handle for your Recipe field is `someRecipe`; this is what you'd use to output information about it:\n\n### Basic Info\n\n* `{{ entry.someRecipe.name }}` - the name of the recipe\n* `{{ entry.someRecipe.description }}` - the description of the recipe\n* `{{ entry.someRecipe.skill }}` - the skill level required to make this recipe\n* `{{ entry.someRecipe.serves }}` - how many people the recipe serves\n* `{{ entry.someRecipe.getImageUrl() }}` - a URL to the image for the recipe\n* `{{ entry.someRecipe.prepTime }}` - the prep time for the recipe in minutes\n* `{{ entry.someRecipe.cookTime }}` - the cooking time for the recipe in minutes\n* `{{ entry.someRecipe.totalTime }}` - the total time for the recipe in minutes\n\n### Ingredients\n\nFor a list of ingredients, do the following (adding whatever output markup you want):\n\n    {% set ingredients = entry.someRecipe.getIngredients('imperial', 1) %}\n    {% for ingredient in ingredients %}\n        {{ ingredient }}\n    {% endfor %}\n\nThe first parameter is the units you'd like to use (`'imperial'` or `'metric'`).  The second parameter is how many people you'd like the recipe portions to be sized for.  By default, it will use `'imperial'` and the serving size in the recipe if you don't pass these parameters in, e.g.: `entry.someRecipe.getIngredients()`\n\n### Directions\n\nFor a list of directions, do the following (adding whatever output markup you want):\n\n    {% set directions = entry.someRecipe.getDirections() %}\n    {% for direction in directions %}\n        {{ direction }}\n    {% endfor %}\n\n### Ratings\n\nFor a list of the ratings, do the following (adding whatever output markup you want):\n\n    {% set ratings = entry.someRecipe.ratings %}\n    {% for rating in ratings %}\n        {{ rating.rating }} {{ rating.review }} {{ rating.author }}\n    {% endfor %}\n\nFor the aggregate (average) rating for this recipe, do the following (adding whatever output markup you want):\n\n    {{ entry.someRecipe.getAggregateRating() }}\n\n### Nutritional Information \n\nTo output the nutritional information for the recipe, do the following:\n\n* `{{ entry.someRecipe.servingSize }}` - The serving size, in terms of the number of volume or mass\n* `{{ entry.someRecipe.calories }}` - The number of calories per serving\n* `{{ entry.someRecipe.carbohydrateContent }}` - The number of grams of carbohydrates per serving\n* `{{ entry.someRecipe.cholesterolContent }}` - The number of milligrams of cholesterol per serving\n* `{{ entry.someRecipe.fatContent }}` - The number of grams of fat per serving\n* `{{ entry.someRecipe.fiberContent }}` - The number of grams of fiber per serving\n* `{{ entry.someRecipe.proteinContent }}` - The number of grams of protein per serving\n* `{{ entry.someRecipe.saturatedFatContent }}` - The number of grams of saturated fat per serving\n* `{{ entry.someRecipe.sodiumContent }}` - The number of milligrams of sodium per serving\n* `{{ entry.someRecipe.sugarContent }}` - The number of grams of sugar per serving\n* `{{ entry.someRecipe.transFatContent }}` - The number of grams of trans fat per serving\n* `{{ entry.someRecipe.unsaturatedFatContent }}` - The number of grams of unsaturated fat per serving\n\n### Image Asset ID\n\nIf you need to do any further manipulation of the Recipe Image (perhaps a transform) you can get the Asset ID for it:\n\n* `{{ entry.someRecipe.imageId }}` - the Asset ID of the image for the recipe\n\n## Rendering Recipe JSON-LD Microdata\n\nIf you have the [SEOmatic plugin](https://github.com/nystudio107/seomatic) installed, Recipe can render JSON-LD microdata for you, which allows it to be displayed in the [Google knowledge panel](https://developers.google.com/structured-data/rich-snippets/recipes) for search results:\n\n\t{{ entry.someRecipe.renderRecipeJSONLD() }}\n\n![Screenshot](resources/screenshots/recipe02.png)\n\n## Recipe Roadmap\n\nSome things to do, and ideas for potential features:\n\n* Provide a front-end way to add ratings\n\n## Recipe Changelog\n\n### 1.0.3 -- 2017.01.05\n\n* [Added] Added support for 1/3, 2/3, and 1/6 fractions\n* [Improved] Updated the README.md\n\n### 1.0.2 -- 2016.09.18\n\n* [Fixed] Handle empty ingredients lists without erroring\n* [Fixed] Handle empty directions without erroring\n* [Improved] Updated the README.md\n\n### 1.0.1 -- 2016.05.01\n\n* [Fixed] Fixed a minor issue with Recipe if it was embedded in a Matrix field\n* [Added] Added the 'Skill Level' field\n* [Improved] Updated the README.md\n\n### 1.0.0 -- 2016.05.01\n\n* Initial release\n\nBrought to you by [nystudio107](http://nystudio107.com)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnystudio107%2Frecipe","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnystudio107%2Frecipe","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnystudio107%2Frecipe/lists"}