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

AMP JavaScript #678

Closed
sareh opened this issue Sep 20, 2018 · 1 comment
Closed

AMP JavaScript #678

sareh opened this issue Sep 20, 2018 · 1 comment
Assignees
Labels
AMP Work related to AMP

Comments

@sareh
Copy link
Contributor

sareh commented Sep 20, 2018

Is your feature request related to a problem? Please describe.
Should contain this script for the AMP version, but not for the canonical version.

<script async src="https://cdn.ampproject.org/v0.js"></script>

Example URLs:
http://localhost:7080/news/articles/amp/c0000000027o AMP
http://localhost:7080/news/articles/c0000000027o Canonical

Describe the solution you'd like
Should use the amp prop available in the Article Container to conditionally render this script tag.
Since the script tag should be in the head, it's recommended to use React Helmet.
Reference: https://www.ampproject.org/docs/fundamentals/spec#scrpt

@sareh sareh added this to the 00. Application Setup milestone Sep 20, 2018
@sareh sareh added the AMP Work related to AMP label Sep 20, 2018
@pjlee11
Copy link

pjlee11 commented Sep 20, 2018

This should require both unit and cypress tests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
AMP Work related to AMP
Projects
None yet
Development

No branches or pull requests

2 participants