Skip to content

Commit

Permalink
Fix issue #942
Browse files Browse the repository at this point in the history
  • Loading branch information
kflu committed Jan 9, 2017
1 parent 1da7ad5 commit 58243a2
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/plugins/helper/open_graph.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,10 @@ function openGraphHelper(options) {

images = images.map(function(path) {
if (!urlFn.parse(path).host) {
if (path[0] !== '/') path = '/' + path;
return config.url + path;
if (path[0] !== '/') {
// resolve `path`'s absolute path relative to current page's url
return urlFn.resolve(url, path);
}
}

return path;
Expand Down

0 comments on commit 58243a2

Please sign in to comment.