From f772747728063ab86d55552252a55ee4ecda1c05 Mon Sep 17 00:00:00 2001 From: Miguel Flores Ruiz de Eguino Date: Wed, 11 May 2016 12:52:28 -0500 Subject: [PATCH] Add facebook admins meta tag to template and facebook spec --- README.md | 4 +++- lib/template.html | 4 ++++ spec/jekyll_seo_tag_spec.rb | 27 +++++++++++++++++++++++++++ 3 files changed, 34 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 132b651..9b78485 100644 --- a/README.md +++ b/README.md @@ -60,12 +60,14 @@ The SEO tag will respect any of the following if included in your site's `_confi username: benbalter ``` -* `facebook:app_id` (a Facebook app ID for Facebook insights), and/or `facebook:publisher` (a Facebook page URL or ID of the publishing entity). You'll want to describe one or both like so: +* `facebook:app_id` (a Facebook app ID for Facebook insights), `facebook:publisher` (a Facebook page URL or ID of the publishing entity) and/or `facebook:admins` + (a Facebook user ID for domain insights linked to a personal account). You'll want to describe one or both like so: ```yml facebook: app_id: 1234 publisher: 1234 + admins: 1234 ``` * `logo` - URL to a site-wide logo (e.g., `/assets/your-company-logo.png`) diff --git a/lib/template.html b/lib/template.html index 59756a1..97e6007 100644 --- a/lib/template.html +++ b/lib/template.html @@ -164,6 +164,10 @@ {% endif %} {% if site.facebook %} + {% if site.facebook.admins %} + + {% endif %} + {% if site.facebook.publisher %} {% endif %} diff --git a/spec/jekyll_seo_tag_spec.rb b/spec/jekyll_seo_tag_spec.rb index 355edc8..559d9fb 100644 --- a/spec/jekyll_seo_tag_spec.rb +++ b/spec/jekyll_seo_tag_spec.rb @@ -252,6 +252,33 @@ EOS end end + context 'facebook' do + let(:site_facebook) do + { + 'admins' => 'jekyllrb-fb-admins', + 'app_id' => 'jekyllrb-fb-app_id', + 'publisher' => 'jekyllrb-fb-publisher' + } + end + + let(:site) { make_site('facebook' => site_facebook) } + + it 'outputs facebook admins meta' do + expected = %r{} + expect(output).to match(expected) + end + + it 'outputs facebook app ID meta' do + expected = %r{} + expect(output).to match(expected) + end + + it 'outputs facebook article publisher meta' do + expected = %r{} + expect(output).to match(expected) + end + end + context 'twitter' do context 'with site.twitter.username' do let(:site_twitter) { { 'username' => 'jekyllrb' } }