Merge pull request #65 from jekyll/pr/seo_page_title
Fix og:title condition and remove redundant tags
This commit is contained in:
commit
2ada2f6a49
|
@ -88,7 +88,7 @@
|
|||
<title>{{ seo_title }}</title>
|
||||
{% endif %}
|
||||
|
||||
{% if seo_title %}
|
||||
{% if seo_page_title %}
|
||||
<meta property="og:title" content="{{ seo_page_title }}" />
|
||||
{% endif %}
|
||||
|
||||
|
@ -126,12 +126,6 @@
|
|||
{% if site.twitter %}
|
||||
<meta name="twitter:card" content="summary" />
|
||||
<meta name="twitter:site" content="@{{ site.twitter.username | replace:"@","" }}" />
|
||||
<meta name="twitter:title" content="{{ seo_title }}" />
|
||||
<meta name="twitter:description" content="{{ seo_description }}" />
|
||||
|
||||
{% if page.image %}
|
||||
<meta name="twitter:image" content="{{ page.image | prepend: seo_url | escape }}" />
|
||||
{% endif %}
|
||||
|
||||
{% if seo_author_twitter %}
|
||||
<meta name="twitter:creator" content="@{{ seo_author_twitter }}" />
|
||||
|
|
|
@ -266,16 +266,6 @@ EOS
|
|||
expect(output).to match(expected)
|
||||
end
|
||||
end
|
||||
|
||||
context 'with page.image' do
|
||||
let(:site) { make_site('twitter' => site_twitter, 'url' => 'http://example.invalid') }
|
||||
let(:page) { make_page('image' => '/img/foo.png') }
|
||||
|
||||
it 'outputs the image' do
|
||||
expected = %r{<meta name="twitter:image" content="http://example.invalid/img/foo.png" />}
|
||||
expect(output).to match(expected)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue