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

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

Issue 29480675: Issue 5329 - Added standard social media meta data to website-defaults (Closed) Base URL: https://hg.adblockplus.org/website-defaults
Patch Set: Removed test page in favour of default template Created Aug. 10, 2017, 7:40 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « filters/to_og_locale.py ('k') | settings.ini » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 {#
2 # This file is part of website-defaults
3 # Copyright (C) 2016-2017 eyeo GmbH
4 #
5 # website-defaults is free software: you can redistribute it and/or
6 # modify it under the terms of the GNU General Public License as published by
7 # the Free Software Foundation, either version 3 of the License, or
8 # (at your option) any later version.
9 #
10 # website-defaults is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 # GNU General Public License for more details.
14 #
15 # You should have received a copy of the GNU General Public License
16 # along with website-defaults. If not, see <http://www.gnu.org/licenses/>.
17 #}
18
19 {# open graph #}
20
21 {% if og_url %}
22 <meta property="og:url" content="{{ og_url }}">
23 {% else %}
24 <meta property="og:url" content="{{ get_canonical_url(page) }}">
25 {% endif %}
26
27 {% if og_type %}
28 <meta property="og:type" content="{{ og_type }}">
29 {% else %}
30 <meta property="og:type" content="website">
31 {% endif %}
32
33 {% if og_site_name %}
34 <meta property="og:site_name" content="{{ og_site_name | translate("og-site-na me", "meta website name") }}">
35 {% elif has_string("site-name", "global") %}
36 <meta property="og:site_name" content="{{ get_string("site-name", "global") }} ">
37 {% endif %}
38
39 {% if og_title %}
40 <meta property="og:title" content="{{ og_title | translate("og-title", "meta p age title") }}">
41 {% elif title %}
42 <meta property="og:title" content="{{ title | translate("page-title") }}">
43 {% endif %}
44
45 {% if og_description %}
46 <meta property="og:description" content="{{ og_description | translate("og-des cription", "meta page description") }}">
47 {% elif description %}
48 <meta property="og:description" content="{{ description | translate("page-desc ription") }}">
49 {% endif %}
50
51 {% if og_image %}
52 <meta property="og:image" content="{{ og_image }}">
53 {% elif image %}
54 <meta property="og:image" content="{{ image }}">
55 {% endif %}
56
57 <meta property="og:locale" content="{{ locale | to_og_locale }}">
58
59 {% for alternate_locale in locales %}
60 {% if alternate_locale != locale %}
61 <meta property="og:locale:alternate" content="{{ alternate_locale | to_og_lo cale }}">
62 {% endif %}
63 {% endfor %}
64
65 {# facebook #}
66
67 {% if facebook_id %}
68 <meta property="fb:app_id" content="{{ facebook_id }}">
69 {% endif %}
70
71 {# twitter #}
72
73 {% if twitter_site %}
74 <meta name="twitter:site" content="@{{ twitter_site }}">
75 {% else %}
76 <meta name="twitter:site" content="@eyeo">
77 {% endif %}
78
79 {% if twitter_card %}
80 <meta name="twitter:card" content="{{ twitter_card }}">
81 {% elif og_image or image %}
82 <meta name="twitter:card" content="summary_large_image">
83 {% else %}
84 <meta name="twitter:card" content="summary">
85 {% endif %}
86
87 {% if twitter_image_alt %}
88 <meta name="twitter:image:alt" content="{{ twitter_image_alt | translate("twit ter-image-alt", "meta featured image alternate text") }}">
89 {% elif image_alt %}
90 <meta name="twitter:image:alt" content="{{ image_alt | translate("image-alt", "meta featured image alternate text") }}">
91 {% endif %}
92
93 {# pinterest #}
94
95 {% if pinterest_id %}
96 <meta name="p:domain_verify" content="{{ pinterest_id }}">
97 {% endif %}
OLDNEW
« no previous file with comments | « filters/to_og_locale.py ('k') | settings.ini » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld