Build production-ready Drupal 12 sites using proven recipes for content moderation, custom modules, modern theming, AI-assisted development, Workspaces, and more
Key Features
- Adopt AI-assisted development using the Drupal AI module and coding agents
- Extend Drupal with custom modules, OO hooks, services, and modern Drupal Recipes
- Modernize Drupal themes with Single Directory Components, Vite, and Tailwind CSS
Book Description
Drupal 12 brings a refreshed editorial experience, modern theming with Single Directory Components, native Drupal Recipes, object-oriented hooks, and the now-stable Workspaces module to one of the most flexible content management platforms on the web. This new edition cookbook covers all of these features alongside the fundamentals every Drupal developer needs. Drupal 12 Development Cookbook begins by helping you set up and manage a Drupal site with DDEV and Drush 13. You will then configure the editorial experience, build advanced content displays with Views, and extend Drupal with custom modules, services, and OO hooks. As you advance, you will ship modern frontends with Vite and Tailwind CSS, build forms with the Form API, run multilingual sites at scale, and integrate AI coding agents into your development workflow. The book also covers automated testing, decoupled and headless Drupal, migration patterns, and packaging your work as Drupal Recipes for reuse. Whether you are new to Drupal or returning from an earlier version, this cookbook gives you the practical, up-to-date toolkit to build, extend, and ship Drupal 12 sites with confidence. Unlike earlier Drupal books focused on legacy workflows, this edition emphasizes modern Drupal 12 development with SDC, Vite, AI workflows, and Drupal Recipes
What you will learn
- Set up Drupal 12 with DDEV and manage codebases with Composer
- Build editorial experiences with content moderation and Workspaces
- Extend Drupal with custom modules, OO hooks, and services
- Modernize themes with SDC, Vite, and Tailwind CSS
- Build APIs with JSON:API and decouple Drupal as a headless backend
- Run multilingual Drupal sites with translation workflows
- Implement automated tests to your Drupal site
- Create reusable Drupal Recipes for configuration and site setup
Who this book is for
This book is for beginner to intermediate Drupal developers who want to jumpstart their journey with Drupal 12. Basic familiarity with web development (HTML, CSS, PHP, and command-line tools) is required. Experienced Drupal developers upgrading from earlier versions will find dedicated guidance on Drupal 12 features such as object-oriented hooks, Single Directory Components, Drupal Recipes, and Vite-powered theming.