Add legacy test and maintain old methods
This commit is contained in:
parent
318de343b0
commit
4c577ffb47
|
@ -115,8 +115,8 @@
|
|||
{% assign seo_page_image_facebook = seo_page_image_facebook | absolute_url %}
|
||||
{% endunless %}
|
||||
{% assign seo_page_image_facebook = seo_page_image_facebook | escape %}
|
||||
{% assign seo_page_image_facebook_width = page.image.facebook.width %}
|
||||
{% assign seo_page_image_facebook_height = page.image.facebook.height %}
|
||||
{% assign seo_page_image_facebook_width = page.image.facebook.width | default: page.image.width %}
|
||||
{% assign seo_page_image_facebook_height = page.image.facebook.height | default: page.image.height %}
|
||||
|
||||
{% assign seo_page_image_twitter = page.image.twitter.path | default: page.image.twitter %}
|
||||
{% unless seo_page_image_twitter contains "://" %}
|
||||
|
|
|
@ -177,6 +177,17 @@ describe Jekyll::SeoTag do
|
|||
expect(output).to match(expected)
|
||||
end
|
||||
end
|
||||
|
||||
context "when given the image height and width (legacy)" do
|
||||
let(:page) { make_page("image" => { "facebook" => "/img/foo.png", "height" => 1, "width" => 2 } ) }
|
||||
|
||||
it "outputs the image" do
|
||||
expected = %r!<meta property="og:image:height" content="1" />!
|
||||
expect(output).to match(expected)
|
||||
expected = %r!<meta property="og:image:width" content="2" />!
|
||||
expect(output).to match(expected)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
context "with site.logo" do
|
||||
|
|
Loading…
Reference in New Issue