Creating recipes for Drupal Gather
These are the steps I took to create a new recipe for the Drupal Gather distribution.
All development work is being done in this monorepo, with the different components in their own directories.
Create the directory for the recipe:
mkdir -p recipes/gather_events
Create recipes/gather_events/composer.json:
{
"name": "drupal/gather_events",
"description": "Creates the event content type.",
"type": "drupal-recipe",
"license": ["GPL-2.0-or-later"]
}
Create recipes/gather_events/recipe.yml:
name: 'Gather: Events'
description: 'Configures the event content type'
type: 'Content Type'
install:
- field
- node
config:
import:
field: '*'
node: '*'
Create recipes/gather_events/config/node.type.event.yml to store the
configuration for the Event content type:
langcode: en
status: true
dependencies: { }
third_party_settings: { }
name: Event
type: event
description: null
help: null
new_revision: true
preview_mode: 1
display_submitted: false
Within the project directory, run composer require drupal/gather_events to
require the recipe.
Add the new recipe name to the gather.info.yml file within the profile directory:
recipes:
required:
- drupal/gather_base
- drupal/gather_events
- drupal/gather_speakers
- drupal/gather_sponsors
Finally, run drush recipe ../recipes/gather_events to apply the recipe.