Render link in twig with 'entity:node/n' as uri in array With the module &quot;config pages&quot; I've set some variables global to render in templates.
In mytheme.theme I've added a function:
function mytheme_preprocess(array &amp;$variables, $hook)
{
    $myConfigPage = \Drupal\config_pages\Entity\ConfigPages::config('config_name');
    $variables['my_settings'] = $myConfigPage-&gt;toArray();
}

In the config_pages I've created a link field.
I would like to render them, but I get below output.
How can I render the link in Twig?
  ^ array:3 [▼
      0 =&gt; array:3 [▼
        &quot;uri&quot; =&gt; &quot;entity:node/186&quot;
        &quot;title&quot; =&gt; &quot;Title 3&quot;
        &quot;options&quot; =&gt; []
      ]
      1 =&gt; array:3 [▼
        &quot;uri&quot; =&gt; &quot;entity:node/189&quot;
        &quot;title&quot; =&gt; &quot;Title 1&quot;
        &quot;options&quot; =&gt; []
      ]
      2 =&gt; array:3 [▼
        &quot;uri&quot; =&gt; &quot;entity:node/195&quot;
        &quot;title&quot; =&gt; &quot;Title 2&quot;
        &quot;options&quot; =&gt; []
      ]
    ]

Twig:
  {{ dd(my_settings.field_links) }}
  {% for link in my_settings.field_links %}
    &lt;div class=&quot;field__item&quot;&gt;
      {{ dd(link) }}
      {{ link.uri|render }}
      {{ link.title }}
    &lt;/div&gt;
  {% endfor %}

None of above are working.
You can render a link with core's link function:

This helper function accepts as first parameter the text and as second parameter the uri
Examples:
{{ link(item.title, item.uri, { 'class':['foo', 'bar', 'baz']} ) }}

In your case, this might look like:
{% for link_item in my_settings.field_links %}
  &lt;div class=&quot;field__item&quot;&gt;
    {{ link(link_item['title'], link_item['uri']) }}
    // or
    {{ link(&quot;My link text&quot;, &quot;entity:node/123&quot;) }}
    // or
    {{ link(&quot;My link text&quot;, &quot;internal:/some/internal/path&quot;) }}
    // or
    {{ link(&quot;My link text&quot;, &quot;route:my.module.route_name&quot;) }}
    // or
    {{ link(&quot;My link text&quot;, &quot;https://drupal.stackexchange.com/&quot;) }}
  &lt;/div&gt;
{% endfor %}

Alternatively, and preferably imo, you can just render the field from the config_page entity (as with any content entity).
For example, in your preprocess:
// Load your config page.
$my_config_page = \Drupal::entityTypeManager()
  -&gt;getStorage('config_pages')
  -&gt;load('my_config_page_identifier');
// Build the render array for my links per the config page's `default` view mode.
$vars['my_links'] = $my_config_page-&gt;field_links-&gt;view('default');

Then, in twig:
{{ my_links }}