-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Kaspar Naaber
committed
Oct 8, 2014
1 parent
1c5964c
commit e64fef3
Showing
6 changed files
with
55 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
{% comment %}https://developers.facebook.com/tools/debug - Debug after each modification{% endcomment %} | ||
{% if site.data.fb_admin %}<meta property="fb:admins" content="{{ site.data.fb_admin }}">{% endif %} | ||
<meta property="og:type" content="{% if article %}article{% else %}website{% endif %}"> | ||
<meta property="og:url" content="{{ site.url }}{% if article %}{{ article.url | remove_first:'/' }}{% else %}{{ page.url | remove_first:'/' }}{% endif %}"> | ||
<meta property="og:title" content="{{ page_title | escape }}"> | ||
<meta property="og:site_name" content="{{ page.site_title | escape }}"> | ||
|
||
{% comment %}Open Graph image{% endcomment %} | ||
{% if front_page == true %} | ||
{% unless page.data.cover_image == '' %} | ||
{% if page.data.cover_image == nil %} | ||
<meta property="og:image" content="{{ site.url }}{{ cover_image | remove_first: '/' }}"> | ||
{% else %} | ||
<meta property="og:image" content="{{ cover_image }}"> | ||
{% endif %} | ||
{% endunless %} | ||
{% else %} | ||
{% if article and article_cover_image != nil and article_cover_image != "" %} | ||
<meta property="og:image" content="{{ article_cover_image }}"> | ||
{% elsif article and article.data.fb_image %} | ||
<meta property="og:image" content="{{ article.data.fb_image }}"> | ||
{% elsif page.data.fb_image %} | ||
<meta property="og:image" content="{{ page.data.fb_image }}"> | ||
{% elsif site.data.fb_image %} | ||
<meta property="og:image" content="{{ site.data.fb_image }}"> | ||
{% endif %} | ||
{% endif %} | ||
|
||
{% comment %}Open Graph description{% endcomment %} | ||
{% if blog and article == nil and (page.description == nil or page.description == "") %} | ||
{% assign excerpt_description = articles.first.excerpt | strip_html | escape | strip_newlines | truncatewords: 200, '...' %} | ||
<meta property="og:description" content="{{ excerpt_description }}"> | ||
<meta name="description" content="{{ excerpt_description }}"> | ||
{% else %} | ||
<meta property="og:description" content="{% if article %}{{ article.description }}{% else %}{{ page.description }}{% endif %}"> | ||
<meta name="description" content="{% if article %}{{ article.description }}{% else %}{{ page.description }}{% endif %}"> | ||
{% endif %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters