Extra options for build published setting

Created on 5 May 2023, almost 2 years ago

Problem/Motivation

The setting Only trigger builds for published content only triggers builds for nodes and related entities defined by entity reference fields. While this setting makes sense for some sites to limit builds to only whats needed on the site, it can also be limiting for the following scenarios:

  1. When a node title changes with pathauto enabled, the updated path alias is not part of the build triggered ultimately leading to a 404
  2. When a redirect for a node is either manually added or programmatically created via path alias update, the redirect is not part of the build
  3. In some cases we may want to have landing pages sourced from Taxonomy terms. Updates to those pages would not be part of the build unless/until a node referencing the term is updated.

Steps to reproduce

Enable the setting Only trigger builds for published content and acknowledge the shortcomings of any one of the 3 scenarios above.

Proposed resolution

Provide an additional setting, checkboxes that allows selection of other entity types aside from nodes that can trigger builds. The list should filter out nodes since they are already assumed in the base setting.

Remaining tasks

  1. Update form
  2. Update the insert/update/delete hooks to account for the setting
  3. Update config
  4. Update tests

User interface changes

An additional setting introduced in the gatsby settings section, hidden when Only trigger builds for published content is disabled.

πŸ“Œ Task
Status

Active

Version

2.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States apmsooner

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024