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

Unified Diff: includes/meta/social.tmpl

Issue 29469558: Issue 5329 - Optimize website-boilerplate for sharing on social media networks (Closed) Base URL: https://hg.adblockplus.org/website-defaults
Patch Set: Fixed typos Created June 21, 2017, 12:05 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 | includes/meta/standard.tmpl » ('j') | 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,77 @@
+{#
+ # This file is part of the website-defaults,
+ # Copyright (C) 2017 eyeo GmbH
+ #
+ # website-defaults is free software: you can redistribute it and/or modify
+ # it under the terms of the GNU General Public License version 3 as
+ # published by the Free Software Foundation.
+ #
+ # website-defaults is distributed in the hope that it will be useful,
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ # GNU General Public License for more details.
+ #
+ # You should have received a copy of the GNU General Public License
+ # along with website-defaults. If not, see <http://www.gnu.org/licenses/>.
+ #
+ # ---
+ #
+ # # Essential meta data for sharing on social media
+ #
+ # og:type
+ # : Page type (e.g. website, article)
+ #
+ # og:site_name
+ # : A short name associated with the site (not page)
+ #
+ # twitter:site
+ # : A twitter username associated with the site (not page)
+ #
+ # og:title
+ # : A clear title without branding or mentioning the domain itself
+ #
+ # og:description
+ # : A clear description, at least two sentences long
+ #
+ # og:image
+ # : Featured image (at least 1200x630, up to 5MB)
+ #}
+{% 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 twitter_site %}
+ <meta name="twitter:site" content="@{{ twitter_site }}">
+{% endif %}
+{% if og_title %}
+ <meta property="og:title" content="{{ og_title }}">
+{% endif %}
+{% if og_description %}
+ <meta property="og:descirption" content="{{ og_description }}">
+{% 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 %}
+{% 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 %}
+{% if host and page %}
+ <meta property="og:url" content="{{ host }}/{{ page }}">
+{% 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 %}
« no previous file with comments | « no previous file | includes/meta/standard.tmpl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld