Routes

Loop through your Template Routes and access inline data.


This tag can save you from having to hardcode links to your Template Routes and gives you access to any inline data you added in your route rules too. It’s a simple thing. Don’t overthink it.

Example

/contact: contact
/press:
  template: press
  title: Press & Media Resources
  show_sidebar: false

{{ routes }}
  <a href="{{ url }}">{{ title or template | deslugify | title }}</a>
{{ /routes }}
  <a href="/contact">Contact</a>
  <a href="/press">Press & Media Resources</a>

Variables

url

string

The route's URL

permalink

string

The route's fully qualified permalink

template

string

The specified template

*

mixed

Any other inline variables

Last modified on September 30, 2016