Skip to content

Drupal-Quick/recipe-blog

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

recipe-blog

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 minimal blog layer to a standard Drupal install.

What it does

  • Adds a Keywords taxonomy vocabulary and an entity reference field (field_keywords) to the Article content type
  • Creates a Writing view (/writing) that lists articles by date, with both a page display and a block display
  • Sets the site front page to /writing
  • Ships theme-asset templates (theme-assets/templates/) that dq:scaffold injects into the generated theme:
    • content/node--article.html.twig — article card markup
    • views/views-view--writing.html.twig — the article list with right-aligned dates
  • Ships a behaviour submodule (module/, machine name dq_blog) that dq:scaffold assembles under the umbrella module and the recipe's install: enables:
    • src/Hook/BlogHooks.php — native OOP #[Hook] preprocessors for Article nodes and the Writing view, which prepare the template variables and build hand-rolled Schema.org JSON-LD (BlogPosting on the full article page, an ItemList of BlogPosting for the writing list). No SEO/metatag module; as a separate extension its hooks stack with the theme's own — no dispatcher.

Dependencies

Depends on the Article content type being present. Apply core/recipes/standard before this recipe, or any other recipe that installs Article.

Usage

This recipe is consumed automatically by Quick. Add "blog" 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-blog
drush recipe recipes/recipe-blog

About

WIP. A default blog/article recipe for the Drupal-Quick theme generator

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors