Per Ben Balter, change usage to a rooted image url
This commit is contained in:
parent
738f4efea7
commit
b42501b45a
|
@ -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 %}
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue