Jinja

Usage

<jinja><![CDATA[
    Hello, {{context.post.roar_authors[0].title}}!
]]></jinja>

Variables

{
    "context": {
        "post": {  // is `null` for any page other than Post Page
            "id": Integer,
            "headline": String,
            "subheadline": String,
            "roar_authors": Array,
            "description": String,  // Article body
            "brief": String,  // Excerpt
            "media_brief": String,  // Excerpt without stripped media
            "primary_tag": String,
            "tags": Array,
            "public_tags": Array,  // Exclude tags with leading "*" or "~"
            "section": Object,
            "basename": String,  // URL Slug
            "page_title": String,  // SEO headline
            "meta_description": String,  // SEO description
            "exclude_from_search_results": Boolean,
            "image": String,  // Lead image URL
            "image_thumb": String,  // Lead image thumbnail URL
            "image_size": String,  // Format: "<width>x<height>"
            "image35x35": String,
            "image210x": String,
            "image300x": String,
            "image600x": String,
            "image980x": String,
            "photo_credit": String,
            "photo_caption": String,
            "frontpage_headline": String,
            "teaser_image": String,  // Article image URL for listings
            "teaser_image35x35": String,
            "teaser_image210x": String,
            "teaser_image300x": String,
            "teaser_image600x": String,
            "teaser_image980x": String,
            "teaser_photo_credit": String,
            "teaser_photo_caption": String,
            "google_amp": Boolean,
            "instant_article": Boolean,
            "og_title": String,  // Social headline
            "og_description": String,  // Social description
            "custom_post_tweet_text": String,  // Custom tweet text
            "social_teaser_image": String,  // Article image URL for social shares
            "social_teaser_image35x35": String,
            "social_teaser_image210x": String,
            "social_teaser_image300x": String,
            "social_teaser_image600x": String,
            "social_teaser_image980x": String,
            "social_teaser_photo_credit": String,
            "social_teaser_photo_caption": String,
            "original_url": String,  // URL of ingested article if any
            "direct_links_out": Boolean,  // Enable redirection to original URL
            "created_ts": Integer,  // Timestamp of publish date
            "created_date": String,  // Publish date in format "MM/DD/YYYY"
            "formated_created_ts": String,  // Publish date in configured short format
            "formated_full_created_ts": String,  // Publish date in configured long format
            "post_url": String,
            "google_amp_post_url": String,
            "roar_specific_data": Object
        },
        "is_amp": Boolean,
        "is_mobile": Boolean,
        "is_tablet": Boolean,
        "is_desktop": Boolean,
        "NoAds": Boolean,
        "global_settings": { // contains all the <variable> elements from Global Settings block
            "typekit-id": String,
            "google-fonts": String,
            "text-color": String,
            "primary-color": String,
            "primary-color-hover": String,
            "secondary-color": String,
            "font-size": int,
            "line-height" int,
            "primary-font": String,
            "secondary-font": String,
            "background-color": String,
            "favicon": String,  // absolute url
            "twitter-site": Striing,
            "twitter-site-id": String,
            "facebook-page-id": String,
            "googleplus_default_href": String,  // url like https://plus.google.com/+weekendaswomen,
            "pinterest_default_href": String,  // url like https://www.pinterest.com/weekendaswomen/,
            "instagram_default_href": String,  // url like https://www.instagram.com/weekendaswomen/,
            "facebook_default_href": String,  // url like https://www.facebook.com/weekendaswomen,
            "linkedin_default_href": String,  // url like https://www.linked.com/in/weekendaswomen,
            "twitter_default_href": String,  // url like https://twitter.com/weekendaswomen,
            "youtube_default_href": String,  // url like https://www.youtube.com/user/weekendaswomen,
            "instant_article_on_by_default": Boolean,
            "applenews_article_by_default": Boolean,
            "facebook_page_id": String,
            "facebook_app_id": String,
            "quantcast_id": String,
            "re_ad_placement_id_for_ia": String,
            "facebook_app_secret": String,
            "applenews_api_key": String,
            "use_applenews_article": Boolean,
            "disable_utm_params": Boolean,
            "mid_ia_articles": String,
            "ga_custom_dimensions": Object,
            "instagram_client_secret": String,
            "instagram_client_id": String,
            "applenews_api_secret": String,
            "use_instant_articles": Boolean,
            "twitter_api_key": String,
            "disable_stats_emails": Boolean,
            "facebook_page_token": String,
            "twitter_api_secret": String,
            "applenews_channel_id": String,
            "ad_placement_id_for_ia": String,
            "title_for_instant_articles": String,
            "company_name": String,
            "use_kicker_for_ia": Boolean,
            "take_live_instant_articles": Boolean,
        },
    }
}

Note

image, teaser_image, and social_teaser_image may have other related fields depending on the ratio/size configurations.

Author Variables

The roar_authors field is an array of objects which has the following schema:

{
    "id": Integer,
    "name": String,  // Slug
    "title": String,
    "about_html": String,  // Bio
    "avatar": String  // Avatar URL
}

Section Variables

section is an object with the following schema:

{
    "id": Integer,
    "name": String,  // Slug
    "title": String,
    "tags": Array,
    "meta_tags": Array,
    "meta_title": String
}

Note

We are in the process of replacing the variable subpage with section. It is important to note, however, that there are still some places where only the subpage variable is available.