| Index: includes/meta/social.tmpl |
| =================================================================== |
| new file mode 100644 |
| --- /dev/null |
| +++ b/includes/meta/social.tmpl |
| @@ -0,0 +1,60 @@ |
| +{# open graph #} |
| + |
| +{% if host and page %} |
| + <meta property="og:url" content="{{ host }}/{{ page }}"> |
| +{% endif %} |
| +{% if og_type %} |
| + <meta property="og:type" content="{{ og_type }}"> |
| +{% endif %} |
| +{% if og_site_name %} |
| + <meta property="og:site_name" content="{{ og_site_name }}"> |
| +{% endif %} |
| +{% if og_title %} |
| + <meta property="og:title" content="{{ og_title }}"> |
| +{% elif title %} |
| + <meta property="og:title" content="{{ title }}"> |
| +{% endif %} |
| +{% if og_description %} |
| + <meta property="og:description" content="{{ og_description }}"> |
| +{% elif description %} |
| + <meta property="og:description" content="{{ description }}"> |
| +{% endif %} |
| +{% if og_image %} |
| + <meta property="og:image" content="{{ og_image }}"> |
| +{% elif og_site_image %} |
| + <meta property="og:image" content="{{ og_site_image }}"> |
| +{% endif %} |
| +<meta property="og:locale" content="{{ locale }}"> |
| +{% for alternate_locale in locales %} |
| + {% if alternate_locale != locale %} |
| + <meta property="og:locale:alternate" content="{{ alternate_locale }}"> |
| + {% endif %} |
| +{% endfor %} |
| + |
| +{# facebook #} |
| + |
| +{% if facebook_id %} |
| + <meta property="fb:app_id" content="{{ facebook_id }}"> |
| +{% endif %} |
| + |
| +{# twitter #} |
| + |
| +{% if twitter_site %} |
| + <meta name="twitter:site" content="@{{ twitter_site }}"> |
| +{% endif %} |
| +{% if twitter_card %} |
| + <meta name="twitter:card" content="{{ twitter_card }}"> |
| +{% elif og_image or og_site_image %} |
| + <meta name="twitter:card" content="summary_large_image"> |
| +{% else %} |
| + <meta name="twitter:card" content="summary"> |
| +{% endif %} |
| +{% if twitter_image_alt %} |
| + <meta name="twitter:image:alt" content="{{ twitter_image_alt }}"> |
| +{% endif %} |
| + |
| +{# pinterest #} |
| + |
| +{% if pinterest_id %} |
| + <meta name="p:domain_verify" content="{{ pinterest_id }}"> |
| +{% endif %} |