Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Look in entire document for metadata not just head #1664

merged 1 commit into from
Nov 28, 2018


Copy link

The JSON-LD script elements can appear anywhere in a document, not just the head. This fixes the detection to account for that so that when another plugin outputs metadata, the AMP plugin won't output a duplicate.

Fixes #1659

@westonruter westonruter added this to the v1.0 milestone Nov 27, 2018
Copy link


Hi @westonruter,
This looks good. I also saw that the plugin doesn't output metadata if it's already in the document, like in the footer:


And if the metadata isn't already present, the plugin still outputs it like before.

@westonruter westonruter merged commit 19a043a into 1.0 Nov 28, 2018
@swissspidy swissspidy deleted the fix/schema-metadata-detection branch June 18, 2019 12:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
None yet

Successfully merging this pull request may close these issues.

None yet

2 participants