Skip to content

Commit

Permalink
Implement Facebook domain verification (#455)
Browse files Browse the repository at this point in the history
Merge pull request 455
  • Loading branch information
fauno authored Oct 28, 2021
1 parent 36330e8 commit 062604e
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 4 deletions.
1 change: 1 addition & 0 deletions docs/usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`.
Expand Down
4 changes: 4 additions & 0 deletions lib/template.html
Original file line number Diff line number Diff line change
Expand Up @@ -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 %}
Expand Down
14 changes: 10 additions & 4 deletions spec/jekyll_seo_tag_integration_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -614,10 +614,11 @@
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

Expand All @@ -642,6 +643,11 @@
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
Expand Down

0 comments on commit 062604e

Please sign in to comment.