Per Ben Balter, change usage to a rooted image url

This commit is contained in:
Bo Turnbow 2016-02-23 15:54:17 -07:00
parent 738f4efea7
commit b42501b45a
2 changed files with 3 additions and 3 deletions

View File

@ -118,7 +118,7 @@
<meta name="twitter:description" content="{{ seo_description }}" />
{% if page.image %}
<meta name="twitter:image" content="{{ page.image | prepend: "/" | prepend: seo_url | escape }}" />
<meta name="twitter:image" content="{{ page.image | prepend: seo_url | escape }}" />
{% endif %}
{% if seo_author_twitter %}

View File

@ -250,10 +250,10 @@ describe Jekyll::SeoTag do
context 'with page.image' do
let(:site) { make_site('twitter' => site_twitter, 'url' => 'http://example.invalid') }
let(:page) { make_page('image' => 'foo.png') }
let(:page) { make_page('image' => '/img/foo.png') }
it 'outputs the image' do
expected = %r{<meta name="twitter:image" content="http://example.invalid/foo.png" />}
expected = %r{<meta name="twitter:image" content="http://example.invalid/img/foo.png" />}
expect(output).to match(expected)
end
end