Open graph support

This commit is contained in:
Marcus Noble 2016-07-26 13:41:47 +01:00
parent 7f67221413
commit a4fd96a4de
2 changed files with 6 additions and 2 deletions

1
app.js
View File

@ -29,6 +29,7 @@ var md = markdown('commonmark', {html: true});
md.parser.use(emoji);
Handlebars.registerHelper('markdown', function(text) {
if(!text) return;
return md.parser.render(text);
});
Handlebars.registerHelper('moment', function(date, format) {

View File

@ -4,12 +4,15 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>{{ site.title }}</title>
<meta name="description" content="{{ title }}">
<meta property="og:url" content="{{ site.url}}/{{ path }}"/>
<meta property="og:title" content="{{ title }}"/>
<meta property="og:description" content="{{ markdown summary }}"/>
<meta property="og:site_name" content="{{ site.title }}"/>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/milligram/1.1.0/milligram.min.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.4.0/styles/zenburn.min.css">
<link rel="stylesheet" href="/css/main.css?{{moment date 'YYYYMMDDHHMM'}}">
<link rel="canonical" href="{{ site.url }}">
<link rel="alternate" type="application/rss+xml" title="{{ site.title }}" href="{{ site.url }}/feed.xml">
<link href="data:image/x-icon;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQEAYAAABPYyMiAAAABmJLR0T///////8JWPfcAAAACXBIWXMAAABIAAAASABGyWs+AAAAF0lEQVRIx2NgGAWjYBSMglEwCkbBSAcACBAAAeaR9cIAAAAASUVORK5CYII=" rel="icon" type="image/x-icon" />
</head>