Instructions on how to use the Default Content module to create default content for a recipe.
The module is required in the dev section. It is not required in production.
fin drush en -y default_content
Content can be exported to a module or recipe, but we want to export to a recipe so we do not need the default_content module on production. We can apply a recipe to import the content.
- Create a recipe at
[project-root]/recipes/[recipe-name]
The recipe only needs to have a folder with it's name and a recipe.yml with
name: 'Example'
description: 'Demo content for example.'
type: 'Content'
-
Create a
/content
folder in that recipe. -
Export the content you want.
drush dcer [entity_type] [bundle or ID] --folder=../recipes/[recipe-name]/content
dcer gets all the dependencies of the entity you are exporting.
- node
- menu_link_content
- taxonomy_term
- media
- user
- Disable the module when done.
fin drush pmu -y default_content