title: Finding jekyll link with regex
body: <p>I couldn't find a <code>page_url</code> method or something similar in jekyll, and I don't want my index page to simply list <em>every</em> page in my static site. So, I've come up with a solution, but I'm not sure how to implement it: I'll use the default code in the index.html to go through each link and then only list the ones that match a certain regex. Something like this:</p>
  
  <pre><code>  &lt;div class="trigger"&gt;
      {% for page in site.pages %}
        {% if page.permalink == '^\/.*\/$' %}
        &lt;a class="page-link" href={{ page.url | prepend: site.baseurl }}&gt;{{ page.title }}&lt;/a&gt;
        {% endif %}
      {% endfor %}
    &lt;/div&gt;
  </code></pre>
  
  <p>Only that doesn't work. I'm sure I'm doing something simple incorrectly. Can anyone help me? Or point me in the direction of an easier way to link to internal pages without having to know the URL of the page before-hand?</p>