Wordsmooshed on February 26th, 2019
AMP stands for Accelerated Mobile Pages, a Google-backed project designed as an "open standard" for any publisher to have pages load quickly on mobile devices. While it's value is hotly debated, there's no question that enough sites use it that we decided it would be important to support.
Statamic 3 will ship with the ability to let you create an AMP version of your entire (or select sections of) site.
By enabling AMP, the AMP version of any given url will be prefixed with
/amp/. For example,
/blog/mmm-bacon is a regular URL and
/amp/blog/mmm-bacon is your AMP URL. If that URL normally loads the
blog.post template, the AMP version will render with the
amp.blog.post template instead.
Essentially, you'll be able to create an entirely separate set of templates that mimick your standard ones, following the same template directory structure.
resources/views/ | |-- amp/ | |-- blog/ | | |-- index.antlers.html | | `-- post.antlers.html | |-- home.antlers.html | `-- layout.antlers.html | |-- blog/ | |-- index.antlers.html | `-- post.antlers.html |-- home.antlers.html `-- layout.antlers.html
Live Preview will even let you see your AMP versions right from the Control Panel.
You can enable AMP on a collection level, or even just for specific routes and URLs. You don't have to AMP your whole site. You're in control. ⚡️
Copyright 2019 Statamic