From 8ea8bdfab29b7c1101e2f163e3cbe3d863d71234 Mon Sep 17 00:00:00 2001 From: Ain Tohvri Date: Fri, 16 Apr 2021 23:25:52 +0200 Subject: [PATCH] Resolve #422 Support for Twitter DNT --- lib/template.html | 4 ++++ spec/jekyll_seo_tag_integration_spec.rb | 11 +++++++++++ 2 files changed, 15 insertions(+) diff --git a/lib/template.html b/lib/template.html index bc507e7..30b4ddd 100755 --- a/lib/template.html +++ b/lib/template.html @@ -109,6 +109,10 @@ {% endif %} +{% if site.do_not_track.twitter %} + +{% endif %} + diff --git a/spec/jekyll_seo_tag_integration_spec.rb b/spec/jekyll_seo_tag_integration_spec.rb index df2ebac..26135b4 100755 --- a/spec/jekyll_seo_tag_integration_spec.rb +++ b/spec/jekyll_seo_tag_integration_spec.rb @@ -686,4 +686,15 @@ RSpec.describe Jekyll::SeoTag do end end end + + context "with do_not_track" do + context "with twitter" do + let(:site) { make_site("do_not_track" => { "twitter" => true }) } + + it "adds DNT metadata for Twitter embeds" do + expected = %r!! + expect(output).to match(expected) + end + end + end end