Change theme:   

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

Site 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>
    ...
    {% unless editmode %}{{ site.analytics }}{% endunless %}  
</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.

data

Returns custom data bound to site.

keywords

Site keywords information

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" />

rss_path

Returns generic RSS-path for site.  

search.enabled

Returns true if user has checked to have a search box on site. The default google search widget can be added as follows:

{% if site.search.enabled %}
  <script type="text/javascript" src="http://static.edicy.com/assets/site_search/3.0/site_search.js?1"></script>
  <script type="text/javascript">
    var edys_site_search_options = {
      texts: { noresults: "{{ "search_noresults"|lc }}" }
    }
  </script>
{% endif %} 
More info about the widget can be found at https://github.com/Edicy/search-widget.

Menu properties

Site also behaves as a root menu item and all its child menu items can be accessed in the same manner.

all_menuitems

Returns list of first-level menu items on site including untranslated items.
all_menuitems_with_data - includes page .data attribute.

menuitems

Returns list of first-level menu items on site.
menuitems_with_data - includes page .data attribute.

hidden_menuitems

Returns all menu items that are hidden. Useful when generating button that groups hidden menuitems together:
{% menubtn site.hidden_menuitems %}  
hidden_menuitems_with_data - includes page .data attribute.

menuitems_with_hidden

Same as menuitems but also returns menu items that are hidden.
menuitems_with_hidden_with_data - includes page .data attribute.

root_item

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

visible_menuitems

Returns menu items that are not hidden.
visible_menuitems_with_data - includes page .data attribute.

Blog

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 %} 

has_articles?

Return true if site has published articles

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 %} 

Languages

languages

Returns list of published language environments defined under site settings

has_many_languages?

Returns true if site has more than one language. Useful for determining visibility of language menu.

Tags

Currently only blog articles can be tagged.

has_tags?

Returns true if something has been tagged in site. Parameter is non language specific checking tags over all languages.

all_tags

Returns list of tag objects on site. Parameter is non language specific returning tags over all languages.

has_language_tags?

Returns true if something has been tagged in sites current language.

language_tags

Returns list of tag objects in sites current language.

Example of making a tag cloud that directs to site blog list page:

{% for tag in site.language_tags  %}
    <a href="/{{ site.blogs.first.page.path }}/tagged/{{ tag.path }}">{{ tag.name }}</a>
{% endfor %}