Merge branch 'master' into cleanup-double-empty-line
This commit is contained in:
commit
2bf7270e70
|
@ -4,6 +4,8 @@
|
|||
|
||||
* Allow to set type for author (#427)
|
||||
* Allow setting `author.url` (#453)
|
||||
* Implement Facebook domain verification (#455)
|
||||
* Add `og:image:alt` and `twitter:image:alt` (#438)
|
||||
|
||||
### Development Fixes
|
||||
|
||||
|
|
|
@ -98,6 +98,7 @@ For most users, setting `image: [path-to-image]` on a per-page basis should be e
|
|||
* `path` - The relative path to the image. Same as `image: [path-to-image]`
|
||||
* `height` - The height of the Open Graph (`og:image`) image
|
||||
* `width` - The width of the Open Graph (`og:image`) image
|
||||
* `alt` - The alternative image text for Open Graph (`og:image:alt`) and Twitter (`twitter:image:alt`)
|
||||
|
||||
You can use any of the above, optional properties, like so:
|
||||
|
||||
|
@ -106,6 +107,7 @@ image:
|
|||
path: /img/twitter.png
|
||||
height: 100
|
||||
width: 100
|
||||
alt: Twitter Logo
|
||||
```
|
||||
|
||||
### Setting a default image
|
||||
|
@ -158,7 +160,7 @@ Which will generate following canonical_url:
|
|||
You can override the default title modifier for paginated pages from `Page %{current} of %{total} for ` to a string of your
|
||||
choice by setting a `seo_paginator_message` key in your `_config.yml`.
|
||||
|
||||
For example:
|
||||
For example:
|
||||
|
||||
```yml
|
||||
seo_paginator_message: "%<current>s / %<total>s | "
|
||||
|
|
|
@ -65,6 +65,7 @@ The following properties are available:
|
|||
alexa: 1234
|
||||
yandex: 1234
|
||||
baidu: 1234
|
||||
facebook: 1234
|
||||
```
|
||||
* `locale` - The locale these tags are marked up in. Of the format `language_TERRITORY`. Default is `en_US`. Takes priority
|
||||
over existing config key `lang`.
|
||||
|
|
|
@ -37,6 +37,9 @@
|
|||
{% if seo_tag.image.width %}
|
||||
<meta property="og:image:width" content="{{ seo_tag.image.width }}" />
|
||||
{% endif %}
|
||||
{% if seo_tag.image.alt %}
|
||||
<meta property="og:image:alt" content="{{ seo_tag.image.alt }}" />
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
{% if page.date %}
|
||||
|
@ -60,6 +63,10 @@
|
|||
<meta name="twitter:card" content="summary" />
|
||||
{% endif %}
|
||||
|
||||
{% if seo_tag.image.alt %}
|
||||
<meta name="twitter:image:alt" content="{{ seo_tag.image.alt }}" />
|
||||
{% endif %}
|
||||
|
||||
{% if seo_tag.page_title %}
|
||||
<meta property="twitter:title" content="{{ seo_tag.page_title }}" />
|
||||
{% endif %}
|
||||
|
@ -106,6 +113,10 @@
|
|||
{% if site.webmaster_verifications.baidu %}
|
||||
<meta name="baidu-site-verification" content="{{ site.webmaster_verifications.baidu }}" />
|
||||
{% endif %}
|
||||
|
||||
{% if site.webmaster_verifications.facebook %}
|
||||
<meta name="facebook-domain-verification" content="{{ site.webmaster_verifications.facebook }}" />
|
||||
{% endif %}
|
||||
{% elsif site.google_site_verification %}
|
||||
<meta name="google-site-verification" content="{{ site.google_site_verification }}" />
|
||||
{% endif %}
|
||||
|
|
|
@ -614,10 +614,11 @@ RSpec.describe Jekyll::SeoTag do
|
|||
context "with site.webmaster_verifications" do
|
||||
let(:site_verifications) do
|
||||
{
|
||||
"google" => "foo",
|
||||
"bing" => "bar",
|
||||
"alexa" => "baz",
|
||||
"yandex" => "bat",
|
||||
"google" => "foo",
|
||||
"bing" => "bar",
|
||||
"alexa" => "baz",
|
||||
"yandex" => "bat",
|
||||
"facebook" => "bas",
|
||||
}
|
||||
end
|
||||
|
||||
|
@ -642,6 +643,11 @@ RSpec.describe Jekyll::SeoTag do
|
|||
expected = %r!<meta name="yandex-verification" content="bat" />!
|
||||
expect(output).to match(expected)
|
||||
end
|
||||
|
||||
it "outputs facebook verification meta" do
|
||||
expected = %r!<meta name="facebook-domain-verification" content="bas" />!
|
||||
expect(output).to match(expected)
|
||||
end
|
||||
end
|
||||
|
||||
context "with site.google_site_verification" do
|
||||
|
|
Loading…
Reference in New Issue