page_robots
Object
Shortcut for outputting robots
directives for
<meta name="robots">
HTML tag.
Attributes
None.
Category
Description
This object outputs a string with robots
directives to use within the
<meta name="robots">
HTML tag for the current page that the user is
accessing.
The output string will contain a combination of index
/noindex
and
follow
/nofollow
, depending on what’s configured for the current
page by content authors in the Page Properties
dialog.
<meta name="robots" content="{{ page_robots }}">
Example Output
<meta name="robots" content="index,follow">
Really, page_robots
is a shortcut for this madness:
<meta name="robots" content="{% if page.search_engine_indexable? %}index{% else %}noindex{% endif %},{% if page.search_engine_followable? %}follow{% else %}nofollow{% endif %}">