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


None yet
2 participants
Copy link

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


This comment has been minimized.

Copy link

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

continuous-integration/travis-ci/pr The Travis CI build passed
continuous-integration/travis-ci/push The Travis CI build passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.