Skip to content

Drupal-Quick/recipe-project

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

recipe-project

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.

What it does

  • 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/) that dq:scaffold injects into the generated theme:
    • content/node--project.html.twig — project card markup
    • views/views-view--projects.html.twig — the three-column thumbnail grid
  • Ships a behaviour submodule (module/, machine name dq_project) that dq:scaffold assembles under the umbrella module and the recipe's install: 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.org ItemList of CreativeWork entries for the projects grid. No SEO/metatag module; as a separate extension its hooks stack with the theme's own — no dispatcher.

Dependencies

Requires the link and image modules. Both are part of Drupal core and are installed automatically when the recipe is applied.

Usage

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

About

WIP. A default projects recipe for the Drupal-Quick theme generator

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors