Create a link using the render API Back in Drupal 7, I was able to create a link  (Ajax enabled) like this:

$page['profile']['links']['videos'] = array(
        '#type' =&gt; 'link',
        '#title' =&gt; t('Videos'),
        '#href' =&gt; 'profile/videos/' . $uid . '/nojs',
        '#attributes' =&gt; array('class' =&gt; array('use-ajax', 'profile-button-videos')),
        '#prefix' =&gt; '&lt;div class="profile-bio-link button-profile button-profile-video"&gt;',
        '#suffix' =&gt; '&lt;/div&gt;', 
      );


Though there are plenty of examples about how to create a link from a URI, or external URL; and how to attach attributes, I can't find a shred of documentation on how to append something as simple as "nojs" on the end of the URL... 

My code so far is this in Drupal 8 (and it works). But, it lacks the /nojs on the end.

Note: I an not using the the Forms API; strictly Render Elements. 

$url = Url::fromRoute('people.profile', ['uid' =&gt; $uid]);
    $render_array['people']['bio'] = [
      '#title' =&gt; $this-&gt;t('Publications link'),
      '#type' =&gt; 'link',
      '#url' =&gt; $url,
      '#attributes' =&gt; array('class' =&gt; array('use-ajax', 'profile-button-bio')),
    ];


The end result should be a link that looks something like this:


  /profile/publications/{uid}/nojs
You will not be able to use a route, as /no-js would be its own route. Instead, you should use Url::fromUri. You should be able to use:

Url::fromUri('internal:/profile/publications/' . $user-&gt;id() . '/nojs');