The AMP plugin is designed to convert Rainlab.Blog pages into pages that comply with the AMP standard.
The following plugin is required
- Add AMP plugin to a project.
- Add the AMP component to a page with the blogPosts component.
The component has the following properties:
- AMP layout - path to the amp layout. This property is used for replacing default page layout.
- AMP schema type - the type of schema to use on AMP pages.
The plugin has the following settings:
- Organisation name - name of the publisher of the content. Typically, this can be the same as the site name.
- Organization logo - logo for your organization.
The amp component injects the following variables to the amp layout:
this.amp.schemaType- the type of schema to use on AMP pages
this.amp.organisationName- the organisation name
this.amp.organisationLogo.src- the organisation logo
this.amp.organisationLogo.height- the organisation logo height
this.amp.organisationLogo.width- the organisation logo width
this.amp.headline- a short headline for an AMP article, using fewer than 110 characters and no HTML markup (post title).
this.amp.datePublished- the date an article was published.
this.amp.dateModified- the date an article was most recently modified date.
this.amp.image.src- an article image to appear in the Top Stories carousel.
this.amp.image.height- an article image height.
this.amp.image.width- an article image width.
this.amp.description- a short description of an AMP article, using fewer than 150 characters and no HTML markup (post excerpt).
You can find more info about AMP and layout examples here.
If you like living on the edge, please report any bugs you find on the issues page.
First version of Amp
Feb 07, 2019