Merge pull request #84 from jvandenaardweg/patch-1
Use og:image to display avatar
This commit is contained in:
commit
48c3d90fc1
1 changed files with 7 additions and 2 deletions
|
@ -11,17 +11,22 @@
|
||||||
{% assign user = site.github.owner %}
|
{% assign user = site.github.owner %}
|
||||||
|
|
||||||
{% if page.path contains '_posts' %}
|
{% if page.path contains '_posts' %}
|
||||||
|
{% assign page_title = page.title %}
|
||||||
{% assign meta_description = page.content | strip_html | strip_newlines | xml_escape | truncate: 300 %}
|
{% assign meta_description = page.content | strip_html | strip_newlines | xml_escape | truncate: 300 %}
|
||||||
{% else %}
|
{% else %}
|
||||||
|
{% assign page_title = user.name %}
|
||||||
{% assign meta_description = user.bio | strip_html | strip_newlines | xml_escape | truncate: 300 %}
|
{% assign meta_description = user.bio | strip_html | strip_newlines | xml_escape | truncate: 300 %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<!doctype html>
|
<!doctype html>
|
||||||
<html class="height-full">
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
|
<title>{{ page_title }}</title>
|
||||||
<meta name="description" content="{{ meta_description }}" />
|
<meta name="description" content="{{ meta_description }}" />
|
||||||
<title>{{ user.name }}</title>
|
<meta property="og:title" content="{{ user.name }}" />
|
||||||
|
<meta property="og:image" content="{{ user.avatar_url }}" />
|
||||||
|
<meta property="og:description" content="{{ meta_description }}" />
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
||||||
<link href="{{ "/assets/styles.css" | relative_url }}" rel="stylesheet" type="text/css">
|
<link href="{{ "/assets/styles.css" | relative_url }}" rel="stylesheet" type="text/css">
|
||||||
</head>
|
</head>
|
||||||
|
|
Loading…
Reference in a new issue