Link to a route in twig [Drupal 8, 9, 10]

You should never hardcode your URLs in drupal. They might change. Use the following generic method instead.

<a href="{{ path('contest.jury') }}" class="card-link stretched-link">{{ 'Meet the jury'|t }}</a>

 

 

Saved you some valuable time?

Buy me a drink 🍺 to keep me motivated to create free content like this!