Facilitate site template development by hooking into config exports that target a recipe

Created on 8 October 2025, 10 days ago

Problem/Motivation

I was working on my session slides for DrupalCon Vienna, which is about how to build a site template. And I realized a few things:

  • At this juncture, the process of building a site template is really a two-step thing: build a site, then export it as a recipe.
  • Exporting as a recipe is fiddly and kind of painful.
  • It is not necessary to have the recipe be cleanly architected and divvied up into smaller, useful recipes the way Drupal CMS is. Recipes, having no update path, can be refactored at any time.

To me, that means we need to have tooling in Drupal CMS that can help and accelerate site builders -- the people who will make site templates.

Proposed resolution

When you export config from Drush, you can put it in a specific directory. We should add a hook in Drupal CMS's helper module so that, if you export all config into a recipe's config directory, the following things happen automatically:

  • The _core and uuid keys are scrubbed from the config.
  • The core.extension config is removed, and transferred into the recipe's install list and composer.json requirements.

We should also provide a drush generate command which can create a boilerplate recipe.

This will be good because it means we can definitively tell people that this is, for now, the quickest way to build a site template:

  1. Install Drupal CMS.
  2. Configure the site as you please.
  3. Create a stub recipe (with drush generate) and export config into it.

That's the whole thing, apart from the look-and-feel part, which is covered by Canvas and/or a bespoke theme.

✨ Feature request
Status

Active

Component

Site Templates

Created by

πŸ‡ΊπŸ‡ΈUnited States phenaproxima Massachusetts

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

No activities found.

Production build 0.71.5 2024