Work in progress — this is a proof-of-concept recipe used to develop and test the Quick scaffolding workflow. The API and config are not yet stable.
A drupal-recipe package that adds a Project content type and grid view to a standard Drupal install.
- Creates a Project content type with three fields: body, a Link field (
field_project_link), and a Thumbnail image (field_project_image) - Creates a Projects view (
/projects) with a three-column thumbnail grid, plus a block display - Ships theme-asset templates (
theme-assets/templates/) thatdq:scaffoldinjects into the generated theme:content/node--project.html.twig— project card markupviews/views-view--projects.html.twig— the three-column thumbnail grid
- Ships a behaviour submodule (
module/, machine namedq_project) thatdq:scaffoldassembles under the umbrella module and the recipe'sinstall:enables:src/Hook/ProjectHooks.php— a native OOP#[Hook]preprocessor for the Projects view, which prepares the template variables and builds a hand-rolled Schema.orgItemListofCreativeWorkentries for the projects grid. No SEO/metatag module; as a separate extension its hooks stack with the theme's own — no dispatcher.
Requires the link and image modules. Both are part of Drupal core and are installed automatically when the recipe is applied.
This recipe is consumed automatically by Quick. Add "project" to the recipes: list in config.dq.yml and run composer exec dq-install followed by drush dq:scaffold. See the Quick workflow for the full steps.
To apply it manually:
composer require drupal-quick/recipe-project
drush recipe recipes/recipe-project