add facebook opengraph tags
This commit is contained in:
parent
66df8a95ca
commit
ed14a7cdc4
@ -6,7 +6,7 @@
|
|||||||
<title>{% if page.title %}{{ page.title }}{% else %}{{ site.title }}{% endif %}</title>
|
<title>{% if page.title %}{{ page.title }}{% else %}{{ site.title }}{% endif %}</title>
|
||||||
|
|
||||||
<meta name="author" content="{{ site.author.name }}" />
|
<meta name="author" content="{{ site.author.name }}" />
|
||||||
<meta name="description" content="{{ site.description }}">
|
<meta name="description" content="{% if page.subtitle %}{{ page.subtitle }}{% else %}{{ site.description }}{% endif %}">
|
||||||
|
|
||||||
<link rel="alternate" type="application/rss+xml" title="{{ site.title }} - {{ site.description }}" href="{{ site.baseurl }}/feed.xml" />
|
<link rel="alternate" type="application/rss+xml" title="{{ site.title }} - {{ site.description }}" href="{{ site.baseurl }}/feed.xml" />
|
||||||
|
|
||||||
@ -45,4 +45,23 @@
|
|||||||
<link rel="stylesheet" href="//fonts.googleapis.com/css?family={{ font }}" />
|
<link rel="stylesheet" href="//fonts.googleapis.com/css?family={{ font }}" />
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
<!-- Facebook OpenGraph tags -->
|
||||||
|
<meta property="og:title" content="{% if page.title %}{{ page.title }}{% else %}{{ site.title }}{% endif %}" />
|
||||||
|
<meta property="og:type" content="website" />
|
||||||
|
|
||||||
|
{% if page.id %}
|
||||||
|
<meta property="og:url" content="{{ site.url }}{{ page.url }}/" />
|
||||||
|
{% else %}
|
||||||
|
<meta property="og:url" content="{{ site.url }}{{ page.url | remove: '/index.html' | remove: '.html' }}" />
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% if page.fb-img %}
|
||||||
|
<meta property="og:image" content="{{ page.fb-img }}" />
|
||||||
|
{% elif site.avatar %}
|
||||||
|
<meta property="og:image" content="{{ site.url }}{{ site.avatar }}" />
|
||||||
|
{% else %}
|
||||||
|
<meta property="og:image" content="" />
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
</head>
|
</head>
|
Loading…
Reference in New Issue
Block a user