fix(layout): use thumbnail image as open graph image

pull/436/head
ppoffice 2019-03-18 19:06:53 -04:00
parent dbcc73db18
commit 4d21835ca6
1 changed files with 6 additions and 2 deletions

View File

@ -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')) { %>