Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Side by Side Diff: includes/meta/social.tmpl

Issue 29680647: Issue 5329 - Provide a template for social media meta data in website-defaults (Closed) Base URL: https://hg.adblockplus.org/website-defaults
Patch Set: Rebased Created Jan. 31, 2018, 11:39 a.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 {% from "macros/meta-tag" import meta_tag %}
2
3 {% set social_media_meta = [
4 ('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)),
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 %}
OLDNEW
« filters/to_og_locale.py ('K') | « filters/to_og_locale.py ('k') | macros/meta-tag.tmpl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld