I am trying to write a custom twig for menu--main.html.twig under Drupal 8.3. When in the menu_links macro while on the home page, the item.in_active_trail is not TRUE. I tried to compare the path('') to item.url but it never returns true. I can print out both path('') and item.url and see that they output the same exact text (character for character). Is there a special way to determine if the item.url is the front page or to string compare URL strings?
{{ path('<front>') == item.url ? 'true' : 'false' }} ==> 'false'
{{ path('<front>') }} ==> '/drupal8_test/'
{{ item.url }} ==> '/drupal8_test/'