Implement Facebook domain verification (#455)

Merge pull request 455
This commit is contained in:
fauno 2021-10-28 13:59:07 -03:00 committed by GitHub
parent 36330e876c
commit 062604e7e1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 15 additions and 4 deletions

View File

@ -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`.

View File

@ -107,6 +107,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 %}

View File

@ -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