drupal / ai_recipe_content_suggestions
Adds support for AI content suggestions
Package info
git.drupalcode.org/project/ai_recipe_content_suggestions.git
Type:drupal-recipe
pkg:composer/drupal/ai_recipe_content_suggestions
Requires
- drupal/ai: ^1.3
- drupal/ai_content_suggestions: ^1.3
- drupal/field_widget_actions: ^1.3
- drupal/token_entity_render: ^2.0
This package is auto-updated.
Last update: 2026-06-11 13:16:46 UTC
README
Adds an AI-powered Suggest title button to the title field on every node edit form. Editors can generate five SEO-optimised title options from the node's current content with a single click.
Requirements
- Drupal core with the
content_editor_rolerecipe already applied (applied transitively by this recipe) - AI module 1.3 or newer with a configured default provider for the
chatoperation type at/admin/config/ai/settings→ Default Providers (any text-capable model, e.g. OpenAI GPT-4o, Claude Sonnet)
Apply
composer require drupal/ai_recipe_content_suggestions
php core/scripts/drupal recipe recipes/contrib/ai_recipe_content_suggestions
drush cache:rebuild
What it does
- Applies
core/recipes/content_editor_role(creates the Content Editor role if it does not exist). - Installs
ai_content_suggestions,field_widget_actions,node, andtoken_entity_render. - Grants the Content Editor role the
access ai content suggestion toolspermission. Adds a Suggest title field widget action to the
titlefield on the default form display of every node type. When clicked, it sends the following prompt to the configured AI provider:Based on the information and context provided, suggest 5 SEO-optimized titles that effectively and accurately reflecting the content. Consider the target audience, main theme, content type, and SEO best practices. Title length should vary from 3 to 8 words across different length ranges (3–4, 5–6, 7–8 words).
The current node context is appended automatically via the
Context:token at the end of the prompt.
Using the suggestion button
- Open any node edit form as a user with the Content Editor role (or Administrator).
- Click the Suggest title button next to the title field.
- The AI returns five title options. Click any option to apply it to the title field.
The button is available on all node types immediately after the recipe is applied. It does not trigger on field focus — it only fires on explicit click.
Customising the prompt
The suggestion prompt can be adjusted per node type at
Structure → Content types → [type] → Manage form display. Edit the
title field widget, expand Field widget actions, and modify the
prompt text or the number of suggestions under the Suggest title action.
To use a specific AI model instead of the site default, set the model
property in the action settings for that form display.
Issue queue
Bugs and feature requests: https://www.drupal.org/project/issues/ai_recipe_content_suggestions