1.0.4 • Published 6 years ago

magnolia-amp v1.0.4

Weekly downloads
5
License
MIT
Repository
github
Last release
6 years ago

magnolia-amp light module

Accelerated Mobile Pages (AMP) starter kit for Magnolia. Implements Schema.org's Article format, meaning an article written using this module could be picked up by Google in its 'Top Stories' carousel.

Features

  • the default AMP layout, with validator, is ready-to-use
  • metadata is automagically published
  • a separate CSS stylesheet and metadata file are provided for ease of use, they will be output into the HTML, as the standard requires
  • two components are provided:
    • block of text (<h2> and <p>)
    • AMP image

Feel free to add more! See the full list here.

Usage

The module can either be used to create a new website, or to create a new version of an existing site.

Metadata

Metadata is key to the AMP standard. A description of the page, much more precise than meta tags, has to be supplied in the page header, so that search engines understand it. In this project, the data is found in /webresources/json/metadata.json. Data can be validated using Google's structured data testing tool.

Canonical URL

When creating an AMP version of an already-existing website, both should be linked. The non-AMP page should have the following link tag:

<link rel="amphtml" href="https://www.example.com/url/to/amp/document.html">

The AMP page should have:

<link rel="canonical" href="https://www.example.com/url/to/full/document.html">

See Make Your Page Discoverable for more details.

Validation

When developing, add #development=1 to the URL you're working on, and make sure the AMP library validates the page.

Validation

License

MIT

Contributors

Maxime Michel