Package: collective.behavior.amp
Support for Accelerated Mobile Pages in PloneTable of ContentsSupport for Accelerated Mobile Pages in PloneLife, the Universe, and EverythingMostly HarmlessDon’t PanicInstallationUsageHow does it workShare and EnjoyChangelog1.0a3 (2017-04-13)1.0a2 (2016-10-06)1.0a1 (2016-10-06)Life, the Universe, and EverythingTheAccelerated Mobile Pages Project(AMP) is an open source project and service to accelerate content on mobile devices.This package implements a behavior for Dexterity-based content types that adds an AMP HTML version of your content.
Most newest mobile browsers will serve this version by default.
Google will also link the mobile search results to this version.Mostly HarmlessGot an idea? Found a bug? Let us know byopening a support ticket.Don’t PanicInstallationTo enable this package in a buildout-based installation:Edit your buildout.cfg and add add the following to it:[buildout]...eggs=collective.behavior.ampAfter updating the configuration you need to run ‘’bin/buildout’’, which will take care of updating your system.Go to the ‘Site Setup’ page in a Plone site and click on the ‘Add-ons’ link.Check the box next toAccelerated Mobile Pages Supportand click the ‘Activate’ button.UsageGo to ‘Site Setup’ and select ‘Accelerated Mobile Pages’;
set the publisher logo and theAMP analytics code, if available.The Accelerated Mobile Pages control panel configlet.Go to ‘Site Setup’ and select ‘Dexterity Content Types’ and enable the ‘Accelerated Mobile Pages’ in your content types.
A new view named@@ampwill become available in all instances of your content type.
The view will display the logo of your site, a global navigation sidebar, and the main fields of your content type (including title, byline, resume, body text, and related items, if available);
it will also include metadata as structured data.Capture of analytics data from AMP documents is supported using theamp-analyticstag.
Refer to the examples inAdding Analytics to your AMP pagesfor more information on how to use this feature.Ifsc.social.likeis installed,
a list of social share buttons honoring the configured plugins will be displayed between the byline and the resume.
Note that you have to enter a valid Facebookapp_idif you want to enable the Facebook button.How does it workAMP is a way to build web pages for static content that render fast.
AMP consists of three different parts:AMP HTMLAMP HTML is HTML with some restrictions for reliable performance and some extensions for building rich content beyond basic HTML.AMP JSThe AMP JS library ensures the fast rendering of AMP HTML pages.Google AMP CacheThe Google AMP Cache can be used to serve cached AMP HTML pages.This package adds an alternate view to display your content as AMP HTML page,
and adds a link to it in the header of any other view:<linkrel="amphtml"href="${context/absolute_url}/@@amp">The body text is processed to remove invalid elements or to replace them by the corresponding AMP components.Share and EnjoyThis package would not have been possible without the contribution of the following people:Héctor VelardeFont Awesome (icons)You can find an updated list of package contributors onGitHub.ChangelogThere’s a frood who really knows where his towel is.1.0a3 (2017-04-13)Fix i18n and update Brazilian Portuguese and Spanish translations (fixes#44).
[hvelarde]Set correct language information (fixes#43).
[hvelarde]Add support for theamp-sticky-adtag.
[hvelarde]Fix support for the<amp-analytics>tag.
[agnogueira, hvelarde]Fix CSS error in logo position.
[kakshay21]Avoid exception when related items relation is broken.
[rodfersou]Fix loading order for main AMP script.
[hvelarde]Add class for social icon <div> tag.
[agnogueira]Move description to article header.
[agnogueira]Do not fail if an image doesn’t have asrcattribute,
or if it was referenced inside the body text as an external resource.
[hvelarde]Clean up invalid AMP HTML attributes (fixes#26).
[rodfersou]Explicitly disable any Diazo theme on the AMP HTML view.
[hvelarde]Usebylinefield (if present) to get the name of the content’s author.
[hvelarde]Fix various exceptions raised when content has Archetypes based lead images.
[hvelarde]1.0a2 (2016-10-06)Fix exception on the AMP HTML view when content has no lead image.
[hvelarde]1.0a1 (2016-10-06)Initial release.