Get node alias in template I create a about-us with Basic Page content type, and with path alias aliased it to \about-us( nid = 2),Now in template file I want to get path alias

&lt;li&gt;&lt;a href="{{  ??????? }}"&gt;{{ 'About Us'|t }}&lt;/a&gt;&lt;/li&gt;


in Drupal 7 I got it with  url("node/2") but what is equivalent in Drupal 8? 
what snippet  I have to use to get path alias of nid 2 in template  file ?
You can use path('entity.node.canonical', {'node': dd.nid}) in the template file.

The markup in the template file would look like this.

&lt;li&gt;&lt;a href="{{path('entity.node.canonical', {'node': dd.nid})}}"&gt;{{ 'About Us'|t }}&lt;/a&gt;&lt;/li&gt;


I haven't tried it, but it should work.