About Drupal Recipe Explorer
The Drupal Recipe Explorer is a tool designed to help developers and site builders discover and explore Drupal recipes. Recipes are a Drupal-specific way to package and share site-building patterns, making it easier to implement common functionality.
What is a Drupal Recipe?
A Drupal recipe is a composer package with the type "drupal-recipe" that contains a predefined set of dependencies and configuration. Recipes are designed to help site builders quickly implement common patterns and functionality in their Drupal projects.
Unlike distributions, recipes can be implemented at any stage of a Drupal site's lifecycle. They offer more flexibility and can be added, removed, or mixed with different features as needed, making them easier to maintain and update over time.
A typical recipe includes:
- Core modules, contrib modules, and themes required for the functionality
- Default configuration for those modules
- Any patches needed for the functionality to work correctly
- Configuration actions that can modify existing site configuration
Recipe Structure
At minimum, a recipe consists of a recipe.yml file, which may include:
Identity and purpose of the recipe
Site, Content-Type, Feature, etc.
Modules and themes to install
Settings and modifications
How to Use Recipes
To use a Drupal recipe in your project, you can add it as a dependency in your composer.json file:
Once installed, you can apply the recipe to your Drupal site using the core recipe script:
Alternatively, if you have Drush installed, you can use:
The "-v" flag provides verbose output showing each step of the recipe application process.
Benefits of Recipes
Recipes offer several advantages over traditional site building approaches and distributions:
Flexibility
Can be applied at any point in a site's lifecycle
Modularity
Mix and match different recipes as needed
Maintainability
Easier to update and maintain than distributions
Reusability
Create templates for common site configurations
Efficiency
Save time by automating repetitive configuration tasks
About This Browser
This recipe browser was built to help the Drupal community discover and explore recipes. The data is collected from multiple sources:
Primary source importing packages from the "drupal" vendor and select community contributors
Parsing composer.json files to extract package names, descriptions, and dependencies from repositories
Examining Drupal.org GitLab composer.json files to gather package metadata and dependency information
The browser provides:
- A searchable, filterable list of all discovered recipes
- Detailed information about each recipe, including dependencies and patches
- Direct links to the original source code repositories
- Regular updates to ensure you have access to the latest recipes
Contributing Recipes
You can contribute your own recipes to the Drupal community by creating a project on Drupal.org. To do this:
- 1.Create a "General Project" on Drupal.org
- 2.Ensure your composer.json includes the type "drupal-recipe"
- 3.Include a clear recipe.yml file with documentation
- 4.Publish your project for others to discover and use
Further Resources
To learn more about Drupal Recipes, check out these resources:
- Distributions and Recipes Initiative on Drupal.org
- Drupal Distributions and Recipes GitLab Repository
- Recipes Cookbook
- Join the #distributions-and-recipes channel on Drupal Slack