Site

Enables access to site related information including:
  • Menu structure for site (including root item)
  • Available languages on site General RSS-path
  • Latest articles on site
  • Site title and logo

Available properties

These properties give access to extra features on this object.

analytics

Renders statistics service javascript code configured under statistics settings screen. It is advised to add this property on all page templates at the end of the HTML document.

<html>
<body>
...
{{ site.analytics }}
</body>
</html>

author

Site author name.

blogs

Returns all blogs in current language environment.

{% for blog in site.blogs %}
  <h2>{{ blog.page.title }}</h2>
  {% for article in blog.articles %}
    {{ article.title }}<br/>
  {% endfor %}
{% endfor %}

copyright

Site copyright information.

hidden_menuitems

Returns all menu items that are hidden. Useful when generating button that groups hidden menuitems together:

{% menubtn site.hidden_menuitems %}

keywords

Site keywords information

languages

Returns list of published language environments defined under site settings

latest_articles

Returns 10 latest blog articles on site. Use latest_n_articles accessor to get appropriate number of articles. Articles are ordered by create date, newer articles first.

latest_n_articles

Returns requested number of latest articles. Replace n with desirable number. Articles are ordered by create date, newer articles first.

{% for article in site.latest_3_articles %}{{ article.title }}<br/>{% endfor %}
{% for article in site.latest_15_articles %}{{ article.title }}<br/>{% endfor %}

logo

Generates logo image for uploaded site logo. If logo has not been uploaded, nothing will be generated.

{{ site.logo }}
=> <img src="photos/site_logo.jpg" />

menuitems

Returns list of first-level menu items on site.

menuitems_with_hidden

Same as menuitems but also returns menu items that are hidden.

root_item

Returns menu item object representing top-level item on site structure, known as "Home page" or landing page.

rss_path

Returns generic RSS-path for site.

visible_menuitems

Returns menu items that are not hidden.