imagex/recipe-article

Article installation for Imagex.

Maintainers

Package info

bitbucket.org/ixm/recipe-article

Type:drupal-recipe

pkg:composer/imagex/recipe-article

Transparency log

Statistics

Installs: 8

Dependents: 0

Suggesters: 0

1.0.0-rc1 2026-08-03 15:13 UTC

This package is auto-updated.

Last update: 2026-08-04 16:08:49 UTC


README

Provides the Article content type as configured for this site: its fields, permissions, URL alias pattern, Card display, and search integration.

This is based on the structure of core's article_content_type recipe (content type, body field, view/form displays, node action config), but replaces core's plain Image field with this site's media-reference field_image, and adds the additional fields, permissions, and displays that have been built for Article. It intentionally does not declare core/recipes/article_content_type as a dependency — that recipe ships its own field_image as a plain Image field and marks it strict, which conflicts with this site's media-reference field_image of the same name. Depending on it would either fail outright (if field_image already exists with different settings) or be silently ignored on a fresh install, since Drupal's recipe system never overwrites existing configuration and a field's storage type can't change after creation.

Recipes Included

  • core/recipes/image_media_type
  • recipe-search

Modules Installed

Fields

FieldTypeNotes
bodyText (formatted, long, with summary)
field_imageEntity reference (Media)References the image media bundle, replacing core's plain Image field
field_featuredBooleanIndexed and boosted in search (see below)
field_topicEntity reference (Taxonomy term)References the topic vocabulary, which this recipe also creates
field_dateDateRequired; defaults to now; drives the article's URL alias and a view sort
field_authorText (plain)Required
field_metatagMetatagSite-wide default values for Article are provided by metatag.metatag_defaults.node__article

Configuration Highlights

  • Displays: Default and Teaser view displays, a Card view display/view mode (used by the articles view's row style), and a form display with the Media Library widget for the image field and Tagify for the topic field.
  • Permissions: grants administrator and content_editor the Article content permissions (create/edit/delete/revert) and the topic vocabulary term permissions.
  • Pathauto: /article/[node:field_date:date:html_date]/[node:title] alias pattern.
  • Menu UI / Search API Exclude: third-party settings are present on the content type (no menu currently selected; Search API Exclude enabled).
  • Search integration: layers field_date, field_featured, and field_topic onto the search_api.index.content index owned by recipe-search via a setProperties config action (rather than shipping a competing copy of that config), and enables the number_field_boost processor, boosting field_featured (factor 13, max aggregation).
  • Articles view (views.view.articles): a Search API–backed, infinite-scroll grid of articles with a keyword filter, a Topic filter (Multiselect Dropdown widget), sorted by relevance, featured status, and date. Available as a page and as a block.

Installation

Add the recipe to a project with Composer:

composer require imagex/recipe-article

Then apply it:

drush recipe:apply recipes/recipe-article

Notes

This recipe uses strict: true — every config file it ships is compared byte-for-byte against whatever's already active, and applying it to a site with conflicting Article configuration will raise an error rather than silently overwriting it. This is deliberate: it keeps the recipe honest about exactly reproducing this site's Article setup, rather than drifting quietly out of sync.