amp-prototyper
amp-prototyper copied to clipboard
Unable to convert AMP page to AMP
When a page is already converted to AMP, e.s. with AMP-related tags after rendering, the AMP validation will throw many errors.
AMP error examples:
line 2, col 0: The attribute 'amp-version' may not appear in tag 'html'. (see https://amp.dev/documentation/guides-and-tutorials/learn/spec/amphtml#required-markup) line 15, col 2: The text inside tag 'style amp-custom' contains 'CSS i-amphtml- name prefix', which is disallowed. (see https://amp.dev/documentation/guides-and-tutorials/learn/spec/amphtml#stylesheets)
What if you pull the source instead of the content if it's detected that it's an AMP page? Not sure if you can pull that with puppeteer, but I think it'll be doable.
that's possible. But the question is: should we support this feature? Or just throw out an error/warning that says "This page is already an AMP"?