Recipes
The base theme ships Drupal recipes that set a site up for Frame in one command each: the modules, their configuration, the permissions of the Content editor role. They are in recipes/ of the theme and are applied by path (Drupal 11).
| Recipe | Installs | Sets up |
|---|---|---|
frame_editor | the base theme, Frame Editor, Media Library, Breakpoint, Responsive Image, Menu UI, Path, CKEditor | the Landing page content type, the Image media type, image styles and the responsive image styles Narrow, Wide and Hero (per breakpoint), the Basic HTML text format, the default theme, the Content editor role |
frame_editor_paragraphs | Paragraphs, Entity Reference Revisions, Paragraphs Library, Entity Usage | the paragraph types Text block (a starter) and From library (made by the editor for pages that use a paragraph of the library), a Usage tab on media, content and library items |
frame_editor_ui_patterns | UI Patterns with Blocks, Layouts, Field Formatters and Views, Field Layout | nothing: components of the theme as blocks, display layouts, field formatters and views styles, with sources of Frame |
frame_editor_field_group | Field Group, Field UI | nothing: group the fields on Manage form display of a content type, each top-level group is a panel of the editor |
frame_editor_seo | Metatag, Metatag: Open Graph, Token | a Meta tags field on Landing page, in the page settings of the editor |
frame_editor_ai | AI, Frame Editor AI | the permission for the assistant |
frame_editor_full | all of the above |
Each of the last six applies frame_editor first, so one command is enough. A recipe never replaces configuration that exists: applying it to a site that has some of it adds the rest, and applying it twice changes nothing.
Apply
Recipes install modules, they do not download them. Get the code first:
# for frame_editor: nothing, it uses core and the theme
composer require drupal/paragraphs drupal/entity_usage # ..._paragraphs
composer require drupal/field_group # ..._field_group
composer require 'drupal/ui_patterns:^2' # ..._ui_patterns
composer require drupal/metatag # ..._seo
composer require drupal/ai # ..._ai, plus a provider, see belowThen, from the Drupal root (web/), with your subtheme installed:
drush theme:install my_theme
drush recipe themes/contrib/frame/recipes/frame_editor_full --input=frame_editor.theme=my_theme
drush crWithout drush: php core/scripts/drupal recipe themes/contrib/frame/recipes/frame_editor_full.
The theme input
The editor works only when the default theme of the site is the Frame theme or a subtheme of it. The recipe makes the theme you name the default one:
--input=frame_editor.theme=my_theme | your subtheme, installed before (drush theme:install my_theme) |
--input=frame_editor.theme=frame | the base theme itself, to look around without a subtheme |
| no input | the default theme of the site is kept. Right when it is already your subtheme |
What you get
Media, breakpoints and responsive images
- The Image media type and the media library: image props and backgrounds of components pick from it.
- Image styles of 325, 650, 1300 and 2600 pixels (core's Standard responsive images recipe) with the responsive image styles Narrow and Wide, which let the browser choose by the width of the image (
sizes). - Hero (per breakpoint) (
frame_hero): one image style per breakpoint of the base theme, mobile, tablet and desktop (frame.breakpoints.yml). Use this kind for backgrounds: a background image gets one@mediarule per breakpoint. See Images.
A subtheme without its own <theme>.breakpoints.yml uses the base theme's breakpoints, in the preview of the editor and in SCSS. To offer only some image styles to editors, list them in the theme's image_styles token.
Text styles and media embed
The recipe adds the text styles of the theme (text_styles in its .info.yml, see Settings) to the Style list of the editor of Basic HTML, and their classes to its allowed HTML, and turns on media embed there (the Embed media filter and the Media plugin of CKEditor 5; the button comes with Media Library). Styles the format has already stay. Other formats get them on the page Frame text styles (/admin/config/content/frame-editor/text-styles), or with the config actions frameTextStyles and frameMediaEmbed.
Revisions
Landing pages create a new revision on every save, and the role can view and revert them. Paragraphs are stored with Entity Reference Revisions: a layout names the revision of each paragraph it shows, so an old revision of a page shows its paragraphs as they were. See Paragraphs.
Reused paragraphs
A Paragraph block is saved to the library from its Library box. With this recipe the library is the one of the Paragraphs Library module (Content → Paragraphs), so the same paragraphs can be used in fields of other content types; see Reusing a paragraph.
Text block is a starter type with a title and a text; add your own under Structure → Paragraph types, each becomes a block.
Field groups
Nothing is grouped for you: Landing page has few fields. On a content type with many, put them into groups on Structure → Content types → Manage form display; every top-level group becomes a panel of the editor with its own button, and the settings of a group have its icon. See Field groups.
Meta tags
The field is in the page settings (nothing selected in the editor). With the assistant, "fill the meta tags" writes them from the page. See AI assistant.
AI assistant
The recipe cannot choose a provider for you. After it:
composer require drupal/ai_provider_anthropic # or ai_provider_openai, ai_provider_ollama...
drush en ai_provider_anthropicthen add the key (Configuration → AI → Provider settings) and choose the default model for Chat (Configuration → AI → AI settings). Until then the AI panel says what is missing.
The Content editor role
Created by core's recipe if the site has none, and given: the editor, creating and editing landing pages and their revisions, media, URL aliases, the Basic HTML format, and with the other recipes the paragraphs library, usage statistics and the assistant. The assistant makes paid requests to your provider: take Use the AI assistant of Frame away from the role if not every editor should have it.
Not in the recipes
- Your subtheme: create it with
frame new, see Build a site. - Content moderation: the editor saves with Publish and Draft and does not show workflow states.
- A provider for the AI module, and translation modules. For translations enable Content Translation and choose Synced or Independent on the content type, see Translation.
Write your own
A site recipe can build on these, for example to add your paragraph types:
# recipes/my_site/recipe.yml
name: 'My site'
type: 'Site'
recipes:
- ../web/themes/contrib/frame/recipes/frame_editor_paragraphs
install:
- my_theme
config:
strict: false
actions:
system.theme:
simpleConfigUpdate:
default: my_themePut the configuration of your paragraph types and fields into the recipe's config/ folder (export it from a site where you built them).