Skip to content

Latest commit

 

History

History
25 lines (18 loc) · 1.2 KB

README.md

File metadata and controls

25 lines (18 loc) · 1.2 KB

#Example of AMP integration

This example is based on news content template of dx-base-demo-templates

What's inside ?

  • A dependency to the news module.
  • A content template "news detail AMP" of jnt:news named "amp"

The views

  • The template view is based on the basic AMP markup and set as the view of the content template. Its name is amp-sample. It only contains a main resource display using detail-amp.
  • The news view is named detail-amp and is based on a simple view detail view of the news

Render Filter

A filter named AssetsAMPFilter has been added and filters non wanted content from StaticAssetsFilter

AMP Image tag use

The tag <amp-img> in now used in the news view

Add links in header section

The AssetsAMPFilter adds the links to canonical and amphtml versions of the page

Make it nicer

Use AMP script features and custom styles

Remove custom scripts

Improve the filter to remove js scripts not supported by AMP