diff --git a/layout/common/head.ejs b/layout/common/head.ejs index cab8859..8d3258c 100644 --- a/layout/common/head.ejs +++ b/layout/common/head.ejs @@ -4,13 +4,17 @@ <%- meta(page) %> <% if (has_config('open_graph')) { %> - <%- open_graph({ + <% const og_options = { twitter_id: get_config('open_graph.twitter_id'), twitter_site: get_config('open_graph.twitter_site'), google_plus: get_config('open_graph.google_plus'), fb_admins: get_config('open_graph.fb_admins'), fb_app_id: get_config('open_graph.fb_app_id') - }) %> + }; + if (has_thumbnail(page)) { + og_options['image'] = get_thumbnail(page); + } %> + <%- open_graph(og_options) %> <% } %> <% if (has_config('rss')) { %>