Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Experiment with an AMP mode #54

Closed
jackmcdade opened this issue Oct 3, 2018 · 1 comment
Closed

Experiment with an AMP mode #54

jackmcdade opened this issue Oct 3, 2018 · 1 comment

Comments

@jackmcdade
Copy link
Member

It should behave, for the most part, like a locale. Configure the global route (either a subdomain or first-segment url), and then check for an AMP-specific layout/template file before falling back to the standard one.

For example:

example.com/amp/blog/new-post would load /blog/new-post (essentially ignoring that first segment), and look for resources/views/amp/layout.antlers.html and resources/views/amp/blog-post.antlers.html.

We should then carry this rendered view through the Live Preview.

We could also make this a paid addon and come with some more boilerplate stuff to help speed up the AMP dev process.

More info on AMP here: https://ampbyexample.com

@jackmcdade jackmcdade changed the title Support an AMP mode Experiment with an AMP mode Jan 31, 2019
@jasonvarga
Copy link
Member

It's off by default. You can enable it by setting 'enabled' => true inside config/statamic/amp.php

When enabled, any route prefixed with /amp will load the corresponding URL and load any amp views.

For example, visiting /amp/blog/post will load /blog/post.
If that entry intends to load a foo layout and a bar template, Statamic will instead try to load amp/foo and amp/bar views respectively.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants