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