Merge pull request #148 from jhabdas/bing-yandex-webmaster
Merge pull request 148
This commit is contained in:
commit
c859774133
|
@ -92,6 +92,15 @@ The SEO tag will respect any of the following if included in your site's `_confi
|
|||
```
|
||||
|
||||
* `google_site_verification` for verifying ownership via Google webmaster tools
|
||||
* Alternatively, verify ownership with several services at once using the following format:
|
||||
|
||||
```yml
|
||||
webmaster_verifications:
|
||||
google: 1234
|
||||
bing: 1234
|
||||
alexa: 1234
|
||||
yandex: 1234
|
||||
```
|
||||
|
||||
The SEO tag will respect the following YAML front matter if included in a post, page, or document:
|
||||
|
||||
|
|
|
@ -172,10 +172,24 @@
|
|||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
{% if site.google_site_verification %}
|
||||
{% if site.webmaster_verifications %}
|
||||
{% if site.webmaster_verifications.google %}
|
||||
<meta name="google-site-verification" content="{{ site.webmaster_verifications.google }}">
|
||||
{% endif %}
|
||||
{% if site.webmaster_verifications.bing %}
|
||||
<meta name="msvalidate.01" content="{{ site.webmaster_verifications.bing }}">
|
||||
{% endif %}
|
||||
{% if site.webmaster_verifications.alexa %}
|
||||
<meta name="alexaVerifyID" content="{{ site.webmaster_verifications.alexa }}">
|
||||
{% endif %}
|
||||
{% if site.webmaster_verifications.yandex %}
|
||||
<meta name="yandex-verification" content="{{ site.webmaster_verifications.yandex }}">
|
||||
{% endif %}
|
||||
{% elsif site.google_site_verification %}
|
||||
<meta name="google-site-verification" content="{{ site.google_site_verification }}" />
|
||||
{% endif %}
|
||||
|
||||
|
||||
<script type="application/ld+json">
|
||||
{
|
||||
"@context": "http://schema.org",
|
||||
|
|
|
@ -440,4 +440,48 @@ EOS
|
|||
expect(output).to match(%r!<link rel="next" href="/bar">!)
|
||||
end
|
||||
end
|
||||
|
||||
context "webmaster verification" do
|
||||
context "with site.webmaster_verifications" do
|
||||
let(:site_verifications) do
|
||||
{
|
||||
"google" => "foo",
|
||||
"bing" => "bar",
|
||||
"alexa" => "baz",
|
||||
"yandex" => "bat"
|
||||
}
|
||||
end
|
||||
|
||||
let(:site) { make_site("webmaster_verifications" => site_verifications) }
|
||||
|
||||
it "outputs google verification meta" do
|
||||
expected = %r!<meta name="google-site-verification" content="foo">!
|
||||
expect(output).to match(expected)
|
||||
end
|
||||
|
||||
it "outputs bing verification meta" do
|
||||
expected = %r!<meta name="msvalidate.01" content="bar">!
|
||||
expect(output).to match(expected)
|
||||
end
|
||||
|
||||
it "outputs alexa verification meta" do
|
||||
expected = %r!<meta name="alexaVerifyID" content="baz">!
|
||||
expect(output).to match(expected)
|
||||
end
|
||||
|
||||
it "outputs yandex verification meta" do
|
||||
expected = %r!<meta name="yandex-verification" content="bat">!
|
||||
expect(output).to match(expected)
|
||||
end
|
||||
end
|
||||
|
||||
context "with site.google_site_verification" do
|
||||
let(:site) { make_site("google_site_verification" => "foo") }
|
||||
|
||||
it "outputs google verification meta" do
|
||||
expected = %r!<meta name="google-site-verification" content="foo" />!
|
||||
expect(output).to match(expected)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue