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

@westonruter westonruter commented Nov 27, 2018

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
@westonruter westonruter requested a review from kienstra Nov 27, 2018
Copy link

@kienstra kienstra commented Nov 28, 2018


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
2 checks passed
2 checks passed
continuous-integration/travis-ci/pr The Travis CI build passed
continuous-integration/travis-ci/push The Travis CI build passed
@swissspidy swissspidy deleted the fix/schema-metadata-detection branch Jun 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.