Index: includes/meta/social.tmpl |
=================================================================== |
new file mode 100644 |
--- /dev/null |
+++ b/includes/meta/social.tmpl |
@@ -0,0 +1,44 @@ |
+{# open graph #} |
+ |
+{% if host and page %} |
+ <meta property="og:url" content="{{ host }}/{{ page }}"> |
juliandoucette
2017/07/05 21:47:25
Note: I created an issue to provide us with a bett
ire
2017/07/07 16:05:06
Acknowledged.
|
+{% endif %} |
+{% if og_type %} |
+ <meta property="og:type" content="{{ og_type }}"> |
+{% endif %} |
+{% if og_site_name %} |
+ <meta property="og:site_name" content="{{ og_site_name }}"> |
+{% endif %} |
+{% if og_title %} |
+ <meta property="og:title" content="{{ og_title }}"> |
+{% endif %} |
+{% if og_description %} |
+ <meta property="og:descirption" content="{{ og_description }}"> |
ire
2017/07/07 16:05:06
Typo in "og:descirption"
juliandoucette
2017/07/07 20:05:20
Done.
Good eye.
ire
2017/07/10 07:50:57
Thanks :)
|
+{% endif %} |
+{% if og_image %} |
+ <meta property="og:image" content="{{ og_image }}"> |
+{% else if og_site_image %} |
+ <meta property="og:image" content="{{ og_site_image }}"> |
+{% endif %} |
+<meta property="og:locale" content="{{ locale }}"> |
juliandoucette
2017/07/05 21:47:25
Note: I'm not sure if the accepted locales are the
ire
2017/07/07 16:05:06
Should this be wrapped in an if statement? Or is l
juliandoucette
2017/07/07 20:05:20
locale is always set. A default must be set in set
ire
2017/07/10 07:50:57
Acknowledged.
|
+{% for alternate_locale in locales %} |
+ {% if alternate_locale != locale %} |
+ <meta property="og:locale:alternate" content="{{ alternate_locale }}"> |
+ {% endif %} |
+{% endfor %} |
+ |
+{# twitter #} |
+ |
+{% if twitter_site %} |
+ <meta name="twitter:site" content="@{{ twitter_site }}"> |
+{% endif %} |
+{% if twitter_card %} |
+ <meta name="twitter:card" content="{{ twitter_card }}"> |
+{% else if og_image or og_site_image %} |
+ <meta name="twitter:card" content="summary_large_image"> |
+{% else %} |
+ <meta name="twitter:card" content="summary"> |
+{% endif %} |
+{% if twitter_image_alt %} |
+ <meta name="twitter:image:alt" content="{{ twitter_image_alt }}"> |
+{% endif %} |