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

Unified 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: Fixed "pinterest" typo Created July 10, 2017, 6:39 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: includes/meta/social.tmpl
===================================================================
new file mode 100644
--- /dev/null
+++ b/includes/meta/social.tmpl
@@ -0,0 +1,56 @@
+{# open graph #}
+
+{% if host and page %}
+ <meta property="og:url" content="{{ host }}/{{ page }}">
+{% 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 }}">
juliandoucette 2017/07/11 12:10:45 I think I should add a fallback here for social ne
ire 2017/07/12 07:55:19 I agree. I may be confused with your term "fallba
juliandoucette 2017/07/12 15:52:38 I'm suggesting: if og_title og:title = og_title
ire 2017/07/13 09:39:46 Ah right. I read your initial statement in the wro
juliandoucette 2017/07/14 11:27:31 RE: Will title be different than og:title (and ali
juliandoucette 2017/07/14 11:27:31 Done.
ire 2017/07/17 07:18:22 Okay makes sense. Thanks.
+{% endif %}
+{% if og_description %}
+ <meta property="og:description" content="{{ og_description }}">
juliandoucette 2017/07/11 12:10:45 I think I should add a fallback here for social ne
juliandoucette 2017/07/14 11:27:31 Done.
+{% 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 }}">
+{% for alternate_locale in locales %}
+ {% if alternate_locale != locale %}
+ <meta property="og:locale:alternate" content="{{ alternate_locale }}">
+ {% endif %}
+{% endfor %}
+
+{# facebook #}
+
+{% if facebook_id %}
+ <meta property="fb:app_id" content="{{ facebook_id }}">
+{% endif %}
+
+{# 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 %}
+
+{# pinterest #}
+
+{% if pinterest_id %}
+ <meta name="p:domain_verify" content="{{ pinterest_id }}">
+{% endif %}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld