title: Foundation: Root variable in links not working for pages in subdirectories
body: <p>On the Foundation site I am working on, there is a dropdown topbar in a navigation partial that populates its links from several YML files in src/data (one per dropdown category). Each entry looks something like this:</p>
  
  <pre><code>link:
    text: "Example Link"
    url:  "beta/page2.html"
    external: false
  </code></pre>
  
  <p>The piece of the partial that generates each menu entry is as follows:</p>
  
  <pre><code>{{#each category}}
      &lt;li&gt;&lt;a href="{{#unless external}}{{root}}{{/unless}}{{url}}" {{#if external}}target="_blank"{{/if}}&gt;{{text}}&lt;/a&gt;&lt;/li&gt;
  {{/each}}
  </code></pre>
  
  <p>The goal is for the link to be relative to the site's root if external is false, and used as-is (and open a new tab) if external is true.</p>
  
  <p>The problem is that internal links don't seem to generate properly when the page I am navigating from is in a subdirectory. For example, if I am on <code>example.com/alpha/page1.html</code>, the menu link above points to <code>example.com/alpha/beta/page2.html</code> instead of <code>example.com/beta/page2.html</code>.</p>
  
  <p>How can I change my code to properly generate the links for the pages?</p>