OLD | NEW |
(Empty) | |
| 1 {% from "macros/meta-tag" import meta_tag %} |
| 2 |
| 3 {% set social_media_meta = [ |
| 4 ('og:url', |
| 5 og_url, |
| 6 get_canonical_url(page)), |
| 7 ('og:type', |
| 8 og_type, |
| 9 'website'), |
| 10 ('og:site_name', |
| 11 og_site_name, |
| 12 get_string('name', 'site') if has_string('name', 'site') else None), |
| 13 ('og:title', |
| 14 og_title | translate('og-title', 'Meta data') if og_title, |
| 15 title | translate('title', 'Meta data') if title else None), |
| 16 ('og:description', |
| 17 og_description | translate('og-description', 'Meta data') if og_description,
|
| 18 description | translate('page-description', 'Meta data') if description), |
| 19 ('og:image', |
| 20 og_image, |
| 21 featured_img_url), |
| 22 ('og:image:alt', |
| 23 og_image_alt, |
| 24 featured_img_alt), |
| 25 ('og:locale', |
| 26 og_locale, |
| 27 locale | to_og_locale), |
| 28 |
| 29 ('twitter:site', |
| 30 '@' + twitter_site if twitter_site, |
| 31 '@' + config.get('social', 'twitter') if config.has_option('social', 'twitte
r') else '@eyeo'), |
| 32 ('twitter:card', |
| 33 twitter_card, |
| 34 'summary_large_image' if og_image or twitter_image or featured_img_url else
'summary'), |
| 35 ('twitter:image', |
| 36 twitter_image, |
| 37 featured_img_url), |
| 38 ('twitter:image:alt', |
| 39 twitter_image_alt, |
| 40 featured_img_alt), |
| 41 |
| 42 ('fb:app_id', |
| 43 facebook_id, |
| 44 config.get('social', 'facebook_id') if config.has_option('social', 'facebook
_id')), |
| 45 |
| 46 ('p:domain_verify', |
| 47 pinterest_id, |
| 48 config.has_option('social', 'pinterest_id') if config.has_option('social', '
pinterest_id')), |
| 49 ] %} |
| 50 |
| 51 {% for property, content, defaultContent in social_media_meta %} |
| 52 {{ meta_tag(property, content, defaultContent) }} |
| 53 {% endfor %} |
OLD | NEW |