Site

Site

{{ site }}

The site object is available on every page, and contains information about the current site. This information is the same on every page for the site.

Name Type Description
is_valid Boolean Will always be true
guid String The unique identifier for the site
name String The name of the site
default_domain_name String The domain name of the default domain for the site
default_timezone String The default timezone for the site
default_meta_description String The default meta description for pages on the site
session_length Integer The number of minutes that sessions will remain active between requests on the current site
favicon String The URL for this site's favicon (if specified)
liveedit_enabled Boolean True if "live editing" is enabled for this site. Note that this only indicate whether it is enabled. To know whether or not the edit link will be displayed, use {{ automatic_markup.show_edit_link }} instead
profiles_enabled Boolean True if profiles are currently enabled for this site
signup_enabled Boolean True if users are allowed to sign up for their own profiles directly from the live site
profile_id_equals_email Boolean True if profiles on this site should use the same value for their id and email. False if the id and email may be different
settings dictionary An object containing all of the site-wide settings for the site currently being viewed. You can query the settings directly using {{ site.settings['setting-name'] }} or using the shortcut {{ site.setting-name }}
output String A json representation of the site object

The site object is copyable, and when copied will copy all of the site settings to the resulting dictionary.

Examples

Set Title

Copy
Template: {% set_title page.browser_title | prepend: " | " | prepend: site.name %} Or: {% capture pageTitle %}{{ site.name }} | {{ page.browser_title }}{% endcapture %}{% set_title pageTitle %} Output: [site.name] | [page.browser_title]

Using Capture to create page descriptions

Copy
{% capture page_description -%} {{ page.browser_title }} | {{ site.name }}: {% unless page.browser_title contains entity.title %} [{{ entity.title }}] {% endunless %} {{ page.meta_description | truncate: 50 '...' }} {%- endcapture %} The page description is "{{ page_description | escape }}"