title
Generates HTML escaped <title>-tag content for the current page, article, or element using an object (page,
article) or site-provided title format (page.title_format, page.title_separator) values and object title value. When object nor site values are set and any
default values for the tag are not provided then system defaults are used.
Usage:
<title>{% title %}</title>
<meta property="og:title" content="{% title %}">
=> "<title>About - My new site</title>
<meta property="og:title" content="About - My new site">"
Usage with layout defaults (used when object nor site values are set):
<title>{% title default_format="site_page" default_separator=">" %}</title>
=> "<title>My new site >About</title>"
Available attributes
format
- When provided, the user-provided format is ignored
(page, article, site).
Supported placeholders:<page_title>
- current page/article/element title.<separator>
- separator.<site_title>
- site title value in current language.
Example:<title>{% title format="#### <page_title> #### < <site_title>" %}</title> #=> "<title>#### About #### < My new site</title>"
- When provided, the user-provided format is ignored
(page, article, site).
default_separator
- Default separator value when object nor site title_separator value has been set. System default value is "–".
Example:
<title>{% title default_separator="<" %}</title> => "<title>About < My new site</title>"
- Default separator value when object nor site title_separator value has been set. System default value is "–".
default_format
- Default format when object nor site title_format value has been set.
Supported values and their corresponding patterns:
page_site
–<page_title> <separator> <site_title>
(system default value)site_page
–<site_title> <separator> <page_title>
page
–<page_title>
site
–<site_title>
Example:<title>{% title default_format="site_page" %}</title> => "<title>My new site – About</title>"
- Default format when object nor site title_format value has been set.
separator
- When provided, the user-provided title separator is ignored
(page, article, site).
Example:
<title>{% title separator="<" %}</title> => "<title>About < My new site</title>"
- When provided, the user-provided title separator is ignored
(page, article, site).