Install
This is the repository archive. It installs, but the folder name will carry the branch suffix and updates will not flow.
Install straight from GitHub with WP-CLI:
wp plugin install https://github.com/johnregan3/wcus-amp/archive/refs/heads/master.zipWCUS AMP Plugin
Overview
This repo includes both a fully-functional plugin that demonstrates how to customize the default template provided by Automattic's AMP plugin, as well as many code samples showing how you can do this in your own projects.
This plugin is written for a planned talk at WordCamp US.
Slides for this talk are available here.
Detail
The main plugin file, wcus-amp.php, contains documentation and basic functions to help add AMP support to your WordPress theme.
/samples is a directory of example usage of each piece of functionality, including some that aren't used in the plugin itself.
Installation
This plugin installs just as any typical WordPress plugin. Place it in your plugins directory, then navigate to Plugins in the WP admin menu, then Activate it. Note that this plugin requires the AMP Plugin by Automattic to function.
Further Reading
Useful Links
- AMP Project Website
- AMP By Example
- "Intro to AMP" Video
- "How AMP Achieves its Speed" Video
- AMP WordPress Plugin
- AMP WordPress Plugin GitHub Repo
AMP Docs
Noteworthy Component Docs from the AMP Project Repo
- amp-ad
- amp-accordion
- amp-analytics
- amp-audio
- amp-brightcove
- amp-carousel
- amp-facebook
- amp-form
- amp-fx-flying-carpet
- amp-lightbox
Author: John Regan | Twitter | WordPress.org