A new Siteleaf is here, upgrade to v2 →




site contains global variables available to all pages.

Variable Description
site.title The title of your website.
site.domain Your website’s domain name (ie. barlawrence.com).
site.permalink Your website’s full address (ie. http://barlawrence.com).
site.pages A nested array of pages.
site.posts Array of all posts in all pages.
site.feed_url URL to your website’s RSS feed (ie. http://barlawrence.com/feed.xml).
site.sitemap_url URL to your website’s Sitemap file (ie. http://barlawrence.com/sitemap.xml).
site.date Date of most recent publish.

For example, use the following Liquid to get the title of your website:


Loop through site.pages to build a menu:

  {% for page in site.pages %}
    <li><a href="{{page.url}}"{% if page.url == url %} class="selected"{% endif %}>{{page.title}}</a></li>
  {% endfor %}