Left: | ||
Right: |
LEFT | RIGHT |
---|---|
1 {# | 1 {# |
juliandoucette
2017/06/21 12:05:01
Does fb:app_id apply to pages?
ire
2017/06/21 13:20:24
Sorry I think I was unclear with my use of "page".
| |
2 # This file is part of the website-defaults, | 2 # This file is part of the website-defaults, |
3 # Copyright (C) 2017 eyeo GmbH | 3 # Copyright (C) 2017 eyeo GmbH |
4 # | 4 # |
5 # website-defaults is free software: you can redistribute it and/or modify | 5 # website-defaults is free software: you can redistribute it and/or modify |
6 # it under the terms of the GNU General Public License version 3 as | 6 # it under the terms of the GNU General Public License version 3 as |
7 # published by the Free Software Foundation. | 7 # published by the Free Software Foundation. |
8 # | 8 # |
9 # website-defaults is distributed in the hope that it will be useful, | 9 # website-defaults is distributed in the hope that it will be useful, |
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 # but WITHOUT ANY WARRANTY; without even the implied warranty of |
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
12 # GNU General Public License for more details. | 12 # GNU General Public License for more details. |
13 # | 13 # |
14 # You should have received a copy of the GNU General Public License | 14 # You should have received a copy of the GNU General Public License |
15 # along with website-defaults. If not, see <http://www.gnu.org/licenses/>. | 15 # along with website-defaults. If not, see <http://www.gnu.org/licenses/>. |
16 # | 16 # |
17 # --- | 17 # --- |
18 # | 18 # |
19 # # Essential meta data for sharing on social media | 19 # # Essential meta data for sharing on social media |
ire
2017/06/21 11:39:29
This list in the comments isn't representative of
juliandoucette
2017/06/21 12:05:00
I excluded fields that I automated (e.g.locale).
| |
20 # | 20 # |
21 # og:type | 21 # og_type |
22 # : Page type (e.g. website, article) | 22 # : Page type (e.g. website, article) |
23 # | 23 # |
24 # og:site | 24 # og_site_name |
ire
2017/06/21 11:39:29
This should be og:site_name
juliandoucette
2017/06/21 12:05:01
Done.
Good catch.
| |
25 # : A short name associated with the site (not page) | 25 # : A short name associated with the site (not page) |
26 # | 26 # |
27 # twitter:site | 27 # og_title |
28 # : A clear title without branding or mentioning the domain itself | |
29 # | |
30 # og_description | |
31 # : A clear description, at least two sentences long | |
32 # | |
33 # og_image | |
34 # : Featured image (at least 1200x630, up to 5MB) | |
35 # | |
36 # twitter_site | |
28 # : A twitter username associated with the site (not page) | 37 # : A twitter username associated with the site (not page) |
29 # | 38 # |
ire
2017/06/21 11:39:29
NIT: Can you group the `og` and the `twitter` meta
juliandoucette
2017/06/21 12:05:01
Acknowledged.
I grouped them categorically. e.g.
juliandoucette
2017/06/21 12:24:16
Done.
| |
30 # og:title | 39 # twitter_image_alt |
31 # : A clear title without branding or mentioning the domain itself | 40 # : A text description of the nature of the featured image for search engines |
32 # | 41 # and the visually impaired (max 420 characters) |
33 # og:description | |
34 # : A clear description, at least two sentences long | |
35 # | |
36 # og:image | |
37 # : Featured image (at least 1200x630, up to 5MB) | |
38 #} | 42 #} |
43 | |
44 <!-- open graph --> | |
45 | |
46 {% if host and page %} | |
47 <meta property="og:url" content="{{ host }}/{{ page }}"> | |
juliandoucette
2017/06/21 12:30:02
@Vasily and/or @Jon I need `protocol://host.domain
juliandoucette
2017/06/21 15:20:45
Done.
https://issues.adblockplus.org/ticket/5343
| |
48 {% endif %} | |
39 {% if og_type %} | 49 {% if og_type %} |
40 <meta property="og:type" content="{{ og_type }}"> | 50 <meta property="og:type" content="{{ og_type }}"> |
41 {% endif %} | 51 {% endif %} |
42 {% if og_site_name %} | 52 {% if og_site_name %} |
43 <meta property="og:site_name" content="{{ og_site_name }}"> | 53 <meta property="og:site_name" content="{{ og_site_name }}"> |
44 {% endif %} | |
45 {% if twitter_site %} | |
46 <meta name="twitter:site" content="@{{ twitter_site }}"> | |
47 {% endif %} | 54 {% endif %} |
juliandoucette
2017/06/21 12:05:01
Note: There is another proprietary field for assoc
| |
48 {% if og_title %} | 55 {% if og_title %} |
49 <meta property="og:title" content="{{ og_title }}"> | 56 <meta property="og:title" content="{{ og_title }}"> |
50 {% endif %} | 57 {% endif %} |
51 {% if og_description %} | 58 {% if og_description %} |
52 <meta property="og:descirption" content="{{ og_description }}"> | 59 <meta property="og:descirption" content="{{ og_description }}"> |
53 {% endif %} | 60 {% endif %} |
54 {% if og_image %} | 61 {% if og_image %} |
55 <meta property="og:image" content="{{ og_image }}"> | 62 <meta property="og:image" content="{{ og_image }}"> |
56 {% else if og_site_image %} | 63 {% else if og_site_image %} |
57 <meta property="og:image" content="{{ og_site_image }}"> | 64 <meta property="og:image" content="{{ og_site_image }}"> |
58 {% endif %} | 65 {% endif %} |
66 <meta property="og:locale" content="{{ locale }}"> | |
67 {% for alternate_locale in locales %} | |
68 {% if alternate_locale != locale %} | |
69 <meta property="og:locale:alternate" content="{{ alternate_locale }}"> | |
70 {% endif %} | |
71 {% endfor %} | |
72 | |
73 <!-- twitter --> | |
74 | |
75 {% if twitter_site %} | |
76 <meta name="twitter:site" content="@{{ twitter_site }}"> | |
77 {% endif %} | |
59 {% if twitter_card %} | 78 {% if twitter_card %} |
60 <meta name="twitter:card" content="{{ twitter_card }}"> | 79 <meta name="twitter:card" content="{{ twitter_card }}"> |
61 {% else if og_image or og_site_image %} | 80 {% else if og_image or og_site_image %} |
62 <meta name="twitter:card" content="summary_large_image"> | 81 <meta name="twitter:card" content="summary_large_image"> |
63 {% else %} | 82 {% else %} |
64 <meta name="twitter:card" content="summary"> | 83 <meta name="twitter:card" content="summary"> |
65 {% endif %} | 84 {% endif %} |
66 {% if twitter_image_alt %} | 85 {% if twitter_image_alt %} |
67 <meta name="twitter:image:alt" content="{{ twitter_image_alt }}"> | 86 <meta name="twitter:image:alt" content="{{ twitter_image_alt }}"> |
68 {% endif %} | 87 {% endif %} |
ire
2017/06/21 11:39:29
These metadata are missing for twitter cards:
twi
juliandoucette
2017/06/21 12:05:00
Falls back to og:image
ire
2017/06/21 13:20:24
Noted.
| |
69 {% if host and page %} | |
70 <meta property="og:url" content="{{ host }}/{{ page }}"> | |
71 {% endif %} | |
72 <meta property="og:locale" content="{{ locale }}"> | |
73 {% for alternate_locale in locales %} | |
74 {% if alternate_locale != locale %} | |
75 <meta property="og:locale:alternate" content="{{ alternate_locale }}"> | |
76 {% endif %} | |
77 {% endfor %} | |
LEFT | RIGHT |