Hwaro::Content::Seo::Amp
Inherits Reference / Object
Constants
Font providers AMP allows via <link rel="stylesheet">. Every other
external stylesheet is disallowed and is stripped during conversion.
Class methods
Convert standard HTML to AMP-compliant HTML
Generate AMP versions of rendered pages. Reads the already-rendered HTML files, converts to AMP-compliant HTML, and writes them under the configured path prefix.
True when src resolves to the same origin as the AMP document.
Unknown means same-origin. An empty or unreadable src is the one
case we must not guess cross-origin on: guessing wrong there hands
allow-same-origin to a same-origin frame, which is precisely the
AMP violation this function exists to prevent. Guessing the other
way only drops a privilege.
Default sandbox for a converted iframe.
AMP: "An amp-iframe must not be in the same origin as the container
unless they do not allow allow-same-origin in the sandbox
attribute." Third-party embeds (YouTube, CodePen, Gist) are
cross-origin and need allow-same-origin to function, but adding it
unconditionally makes any iframe pointing back at the site itself
fail AMP validation outright.