AMP: Accelerated Mobile Pages Re-Imagined Karen Stevenson - - PowerPoint PPT Presentation

amp accelerated mobile pages re imagined
SMART_READER_LITE
LIVE PREVIEW

AMP: Accelerated Mobile Pages Re-Imagined Karen Stevenson - - PowerPoint PPT Presentation

DRUPALCON SEATTLE 2019 AMP: Accelerated Mobile Pages Re-Imagined Karen Stevenson Director of Technology L U L L A B O T Lullabot 1 About Lullabot Were a strategy, design, and Drupal development company that creates large-scale digital


slide-1
SLIDE 1

L U L L A B O T

1

AMP: Accelerated Mobile Pages Re-Imagined

DRUPALCON SEATTLE 2019 Karen Stevenson Director of Technology Lullabot

slide-2
SLIDE 2

L U L L A B O T

2

We’re a strategy, design, and Drupal development company that creates large-scale digital publishing systems.

One of the first Drupal agencies

Contributed to over 150 modules

Published books on Drupal

Many articles, podcasts, and presentations about Drupal

About Lullabot

slide-3
SLIDE 3

L U L L A B O T

3

What is AMP?

❏ Open standard ❏ Better mobile experience ❏ Better search results

slide-4
SLIDE 4

L U L L A B O T

4

AMP Requirements

❏ Page head markup ❏ Schema.org metadata as JSON-LD ❏ CSS restrictions ❏ No javascript other than AMP async javascript ❏ Numerous alternate and/or prohibited HTML elements ❏ Explicit element width and height

slide-5
SLIDE 5

L U L L A B O T

5

AMP, circa 2016

❏ Separate AMP page ❏ News articles only ❏ Dumbed-down content and theme ❏ Limited list of static components

slide-6
SLIDE 6

L U L L A B O T

6

AMP, circa 2019

❏ AMP pages look like rest of site ❏ AMP for all pages, including landing pages ❏ AMP-only sites ❏ Expanded, dynamic, interactive components

slide-7
SLIDE 7

L U L L A B O T

AMP in Drupal 8

7

slide-8
SLIDE 8

L U L L A B O T

8

Some things are easy(ier) ...

❏ Custom markup ❏ Twig templates and template overrides ❏ Adding/removing css and javascript ❏ Library API ❏ Render API (#attached) ❏ Alternate markup for structured content ❏ View modes ❏ Field formatters

slide-9
SLIDE 9

L U L L A B O T

9

Some things are not ...

❏ Rendering css inline instead of @import ❏ Limiting the size of the css ❏ Creating an AMP theme ❏ Cleaning up unstructured content like body field

slide-10
SLIDE 10

L U L L A B O T

10

Drupal AMP 8.3

slide-11
SLIDE 11

L U L L A B O T

Schema.org Metatag

11

slide-12
SLIDE 12

L U L L A B O T

Inline CSS

❏ /Drupal/amp/Asset/AmpCssCollectionRenderer ❏ Extends the standard CSS rendering process ❏ Renders CSS inline ❏ Tracks the name and size of each CSS file ❏ Tracks the size of the aggregated CSS ❏ Cleans and minifies the aggregated CSS ❏ Exposes a method to review the list of files and sizes

12

slide-13
SLIDE 13

L U L L A B O T

13

/page-name?amp&debug

slide-14
SLIDE 14

L U L L A B O T

14

CSS Tree Shaking

slide-15
SLIDE 15

L U L L A B O T

15

theme.info.yml

slide-16
SLIDE 16

L U L L A B O T

16

amp.libraries.yml

slide-17
SLIDE 17

L U L L A B O T

17

AmpFormTrait.php

slide-18
SLIDE 18

L U L L A B O T

18

AMP Formatters

Links to documentation

slide-19
SLIDE 19

L U L L A B O T

19

AMP Social Share Block

slide-20
SLIDE 20

L U L L A B O T

20

AMP Sidebar

slide-21
SLIDE 21

L U L L A B O T

21

slide-22
SLIDE 22

L U L L A B O T

22

AMP Library

slide-23
SLIDE 23

L U L L A B O T

Automatic Conversion

23

slide-24
SLIDE 24

L U L L A B O T

24

Library Updates / Alternatives

slide-25
SLIDE 25

L U L L A B O T

25

Resources

❏ Drupal Project - https://www.drupal.org/project/amp ❏ AMP Project - https://www.ampproject.org ❏ AMP By Example - https://ampbyexample.com ❏ AMP Start - https://www.ampstart.com

slide-26
SLIDE 26

L U L L A B O T

26

Q&A

slide-27
SLIDE 27

L U L L A B O T

27

Contribution Opportunities

Mentored Contribution

9:00 - 18:00 Room 602 Friday, April 12, 2019 #drupalcontributions

First Time Contributor Workshop

9:00 - 12:00 Room 606

General Contribution

9:00 - 18:00 Room 6A

slide-28
SLIDE 28

L U L L A B O T

28

What did you think?

You can find our session on the DrupalCon website: https://events.drupal.org/seattle2019/sessions/amp-accelerated- mobile-pages-re-imagined And, provide feedback! https://www.surveymonkey.com/r/DrupalConSeattle