How can I add Taxonomy Term to a Node's Breadcrumb? The Node has attached a single Term.

Current breadcrumbs rendered

[HOME] &gt;&gt; [NODE_TITLE]


Want to render like this.

[HOME] &gt;&gt; [TERM] &gt;&gt; [NODE_TITLE]
Themers who don't want to use a custom module to implement a BreadcrumbBuilder can change the breadcrumbs in a preprocess hook.

Example how you can add a link before the last link:

function mytheme_preprocess_breadcrumb(&amp;$variables) {
  $breadcrumb = &amp;$variables['breadcrumb'];
  $lastlink = array_pop($breadcrumb);
  array_push($breadcrumb, [
    'text' =&gt; 'New Link',
    'url' =&gt; '/newlink',
  ]);
  array_push($breadcrumb, $lastlink);
}


If you add a taxonomoy term from a node you would have to add both as cache tags and a cache context on the url to make this work.