From 062604e7e145e47708e30213a14e03ccf750903b Mon Sep 17 00:00:00 2001 From: fauno Date: Thu, 28 Oct 2021 13:59:07 -0300 Subject: [PATCH 1/4] Implement Facebook domain verification (#455) Merge pull request 455 --- docs/usage.md | 1 + lib/template.html | 4 ++++ spec/jekyll_seo_tag_integration_spec.rb | 14 ++++++++++---- 3 files changed, 15 insertions(+), 4 deletions(-) diff --git a/docs/usage.md b/docs/usage.md index 489c233..20dbd41 100644 --- a/docs/usage.md +++ b/docs/usage.md @@ -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`. diff --git a/lib/template.html b/lib/template.html index 682330b..8bc25d5 100755 --- a/lib/template.html +++ b/lib/template.html @@ -107,6 +107,10 @@ {% if site.webmaster_verifications.baidu %} {% endif %} + + {% if site.webmaster_verifications.facebook %} + + {% endif %} {% elsif site.google_site_verification %} {% endif %} diff --git a/spec/jekyll_seo_tag_integration_spec.rb b/spec/jekyll_seo_tag_integration_spec.rb index b0b9d26..cde2e77 100755 --- a/spec/jekyll_seo_tag_integration_spec.rb +++ b/spec/jekyll_seo_tag_integration_spec.rb @@ -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!! expect(output).to match(expected) end + + it "outputs facebook verification meta" do + expected = %r!! + expect(output).to match(expected) + end end context "with site.google_site_verification" do From 41b23937a96db83212be29521a5422e2fbbfdb8b Mon Sep 17 00:00:00 2001 From: jekyllbot Date: Thu, 28 Oct 2021 12:59:08 -0400 Subject: [PATCH 2/4] Update history to reflect merge of #455 [ci skip] --- History.markdown | 1 + 1 file changed, 1 insertion(+) diff --git a/History.markdown b/History.markdown index 54bda88..c801d21 100644 --- a/History.markdown +++ b/History.markdown @@ -4,6 +4,7 @@ * Allow to set type for author (#427) * Allow setting `author.url` (#453) + * Implement Facebook domain verification (#455) ### Development Fixes From 4a590c9d0be6429599e5c0ce0a2919043473f134 Mon Sep 17 00:00:00 2001 From: Tobias Date: Mon, 22 Nov 2021 18:56:57 +0100 Subject: [PATCH 3/4] Add `og:image:alt` and `twitter:image:alt` (#438) Merge pull request 438 --- docs/advanced-usage.md | 4 +++- lib/template.html | 7 +++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/docs/advanced-usage.md b/docs/advanced-usage.md index e534abd..f334496 100644 --- a/docs/advanced-usage.md +++ b/docs/advanced-usage.md @@ -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: "%s / %s | " diff --git a/lib/template.html b/lib/template.html index 8bc25d5..5878047 100755 --- a/lib/template.html +++ b/lib/template.html @@ -37,6 +37,9 @@ {% if seo_tag.image.width %} {% endif %} + {% if seo_tag.image.alt %} + + {% endif %} {% endif %} {% if page.date %} @@ -61,6 +64,10 @@ {% endif %} +{% if seo_tag.image.alt %} + +{% endif %} + {% if seo_tag.page_title %} {% endif %} From dba6621d1fbacc4717122657e48bf188919783ad Mon Sep 17 00:00:00 2001 From: jekyllbot Date: Mon, 22 Nov 2021 12:56:59 -0500 Subject: [PATCH 4/4] Update history to reflect merge of #438 [ci skip] --- History.markdown | 1 + 1 file changed, 1 insertion(+) diff --git a/History.markdown b/History.markdown index c801d21..2672e26 100644 --- a/History.markdown +++ b/History.markdown @@ -5,6 +5,7 @@ * 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