Extend link field output on Drupal Twig Template
<p>I'm trying to figure out how to extend a common Link Field in Drupal 8 with an HTML entity (like &raquo;).
My first try was a preprocess function for the field. Unfortunately I didn't manage to set the <code>html</code> option of the link to <code>true</code>
Here's how I tried it</p>

<pre><code>function MYTHEME_preprocess_field(&amp;$variables) {
  if ($variables['element']['#field_name'] == 'field_slideshow_link'){
    foreach ($variables['items'] as $idx =&gt; $item) {
      $variables['items'][$idx]['content']['#title'] = $variables['items'][$idx]['content']['#title'] . " &lt;span&gt;&amp;raquo;&lt;/span&gt;";
      $variables['items'][$idx]['content']['#url']-&gt;setOption('html', true);
    }
  }
}
</code></pre>

<p>This didn't work. So the only solution I came up with was to manually generate a Link within the template. With just doesn't feel right. Here's how I did it</p>

<pre><code>  &lt;a href="{{ node.field_slideshow_link.0.url }}"&gt;{{ node.field_slideshow_link.0.title }} &lt;span&gt;&amp;raquo;&lt;/span&gt;&lt;/a&gt;
</code></pre>

<p>Has anyone an idea how to solve this problem more elegantly?</p>