Resolve #422 Support for Twitter DNT
This commit is contained in:
parent
93c664bce0
commit
8ea8bdfab2
|
@ -109,6 +109,10 @@
|
|||
<meta name="google-site-verification" content="{{ site.google_site_verification }}" />
|
||||
{% endif %}
|
||||
|
||||
{% if site.do_not_track.twitter %}
|
||||
<meta name="twitter:dnt" content="on">
|
||||
{% endif %}
|
||||
|
||||
<script type="application/ld+json">
|
||||
{{ seo_tag.json_ld | jsonify }}
|
||||
</script>
|
||||
|
|
|
@ -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!<meta name="twitter:dnt" content="on">!
|
||||
expect(output).to match(expected)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue