This commit is contained in:
Ain Tohvri 2023-11-08 03:00:29 +00:00 committed by GitHub
commit 97a9bd8759
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 15 additions and 0 deletions

View File

@ -122,6 +122,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>

View File

@ -717,4 +717,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