imagex / recipe-article
Article installation for Imagex.
Requires
- drupal/metatag: *
- drupal/multiselect_dropdown: *
- drupal/pathauto: *
- drupal/tagify: *
- drupal/views_infinite_scroll: *
- imagex/recipe-search: *
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_typerecipe-search
Modules Installed
- Datetime (core)
- Image (core)
- Layout Builder (core)
- Media (core)
- Media Library (core)
- Menu UI (core)
- Metatag (including the Open Graph submodule)
- Multiselect Dropdown (including the Better Exposed Filters submodule)
- Node (core)
- Path (core)
- Pathauto
- Tagify
- Taxonomy (core)
- Text (core)
- Views Infinite Scroll
Fields
| Field | Type | Notes |
|---|---|---|
body | Text (formatted, long, with summary) | |
field_image | Entity reference (Media) | References the image media bundle, replacing core's plain Image field |
field_featured | Boolean | Indexed and boosted in search (see below) |
field_topic | Entity reference (Taxonomy term) | References the topic vocabulary, which this recipe also creates |
field_date | Date | Required; defaults to now; drives the article's URL alias and a view sort |
field_author | Text (plain) | Required |
field_metatag | Metatag | Site-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
articlesview's row style), and a form display with the Media Library widget for the image field and Tagify for the topic field. - Permissions: grants
administratorandcontent_editorthe Article content permissions (create/edit/delete/revert) and thetopicvocabulary 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, andfield_topiconto thesearch_api.index.contentindex owned byrecipe-searchvia asetPropertiesconfig action (rather than shipping a competing copy of that config), and enables thenumber_field_boostprocessor, boostingfield_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.