[buddypress-trac] [BuddyPress Trac] #6927: Support AMP (Accelerated Mobile Pages)
buddypress-trac
noreply at wordpress.org
Wed Feb 24 17:27:27 UTC 2016
#6927: Support AMP (Accelerated Mobile Pages)
------------------------------+-----------------------------
Reporter: slaFFik | Owner:
Type: idea | Status: new
Priority: normal | Milestone: Future Release
Component: Component - Core | Version:
Severity: normal | Resolution:
Keywords: |
------------------------------+-----------------------------
Changes (by r-a-y):
* component: Not sure => Component - Core
* milestone: Awaiting Review => Future Release
Comment:
Specs here:
https://www.ampproject.org/docs/get_started/create_page.html
Bare minimum required:
- Start with the doctype `<!doctype html>`.
- Contain a top-level `<html ⚡>` tag (`<html amp>` is accepted as well).
- Contain `<head>` and `<body>` tags (They are optional in HTML).
- Contain a `<link rel="canonical" href="$SOME_URL" />` tag inside their
head that points to the regular HTML version of the AMP HTML document or
to itself if no such HTML version exists.
- Contain a `<meta charset="utf-8">` tag as the first child of their head
tag.
- Contain a `<meta name="viewport" content="width=device-width,minimum-
scale=1">` tag inside their head tag. It’s also recommended to include
initial-scale=1.
- Contain a `<script async
src="https://cdn.ampproject.org/v0.js"></script>` tag as the last element
in their head (this includes and loads the AMP JS library).
- Contain the following in their `<head>` tag: `<style amp-
boilerplate>body{-webkit-animation:-amp-start 8s steps(1,end) 0s 1 normal
both;-moz-animation:-amp-start 8s steps(1,end) 0s 1 normal both;-ms-
animation:-amp-start 8s steps(1,end) 0s 1 normal both;animation:-amp-start
8s steps(1,end) 0s 1 normal both}@-webkit-keyframes -amp-
start{from{visibility:hidden}to{visibility:visible}}@-moz-keyframes -amp-
start{from{visibility:hidden}to{visibility:visible}}@-ms-keyframes -amp-
start{from{visibility:hidden}to{visibility:visible}}@-o-keyframes -amp-
start{from{visibility:hidden}to{visibility:visible}}@keyframes -amp-
start{from{visibility:hidden}to{visibility:visible}}</style><noscript><style
amp-boilerplate>body{-webkit-animation:none;-moz-animation:none;-ms-
animation:none;animation:none}</style></noscript>`
- Replace `<img>` tags with `<amp-img>`
- Add `amphtml` meta to `<head>`: `<link rel="amphtml"
href="https://www.example.com/url/to/amp/document.html">`
Most of the things listed above are theme-related, so it doesn't make much
sense for BuddyPress to make those changes.
I'm thinking we just create a supplementary addon to whatever WordPress
AMP plugin becomes the standard. This shouldn't be a BP core thing unless
WP rolls AMP support into core.
On our side, the `amphtml` and `canonical` meta links are what we would
need to add. Plus, there are also styling implications for our bundled
template packs:
https://www.ampproject.org/docs/get_started/create/presentation_layout.html
--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/6927#comment:4>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac
More information about the buddypress-trac
mailing list