diff options
-rw-r--r-- | _includes/meta.html | 18 | ||||
-rw-r--r-- | _layouts/default.html | 7 |
2 files changed, 19 insertions, 6 deletions
diff --git a/_includes/meta.html b/_includes/meta.html new file mode 100644 index 0000000..b8f4a33 --- /dev/null +++ b/_includes/meta.html @@ -0,0 +1,18 @@ + <meta charset="utf-8" /> + <meta content='text/html; charset=utf-8' http-equiv='Content-Type'> + <meta http-equiv='X-UA-Compatible' content='IE=edge'> + <meta name='viewport' content='width=device-width, initial-scale=1.0, maximum-scale=1.0'> + + {% if page.excerpt %} + <meta name="description" content="{{ page.excerpt| strip_html }}" /> + <meta property="og:description" content="{{ page.excerpt| strip_html }}" /> + {% else %} + <meta name="description" content="{{ site.description }}"> + <meta property="og:description" content="{{ site.description }}" /> + {% endif %} + <meta name="author" content="{{ site.name }}" /> + + {% if page.title %} + <meta property="og:title" content="{{ page.title }}" /> + <meta property="twitter:title" content="{{ page.title }}" /> + {% endif %}
\ No newline at end of file diff --git a/_layouts/default.html b/_layouts/default.html index f4d3255..b2939c0 100644 --- a/_layouts/default.html +++ b/_layouts/default.html @@ -1,14 +1,9 @@ <!DOCTYPE html> <html> <head> - <meta charset="utf-8" /> - <meta http-equiv="X-UA-Compatible" content="IE=edge"> - <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0"> - <title>{% if page.title %}{{ page.title }} – {% endif %}{{ site.name }} – {{ site.description }}</title> - <meta name="author" content="{{ site.name }}" /> - <meta name="description" content="{{ site.description }}"> + {% include meta.html %} <!--[if lt IE 9]> <script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script> |