Skip to content

AMP rendered as a separate page with canonical link #1308

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

Closed
jerriclynsjohn opened this issue May 3, 2021 · 1 comment · Fixed by #4710
Closed

AMP rendered as a separate page with canonical link #1308

jerriclynsjohn opened this issue May 3, 2021 · 1 comment · Fixed by #4710
Milestone

Comments

@jerriclynsjohn
Copy link

jerriclynsjohn commented May 3, 2021

Is your feature request related to a problem? Please describe.
I want to be able to generate a separate page for every single one of my pages in my project. The reason is, I want to avoid interactive components when the customer views in AMP and show the fully-fledged page when in normal mode.

Eg:
AMP page: https://sandeep.dev/amp/choosetochallenge-removing-the-subconscious-bias
Normal page: https://sandeep.dev/choosetochallenge-removing-the-subconscious-bias

You can see that the amp page is served from an amp folder

Describe the solution you'd like
Additional property for the amp option in config which can mention the custom folder to which it will be compiled to and a global variable to define {#if} blocks to avoid certain components during amp compilation.

Svelte kit should be able to automatically include canonical like back to the main site from amp page and also mention the amphtml link in the main page.

https://amp.dev/documentation/guides-and-tutorials/optimize-and-measure/discovery/

How important is this feature to you?
Our application will need amp pages or it is a dealbreaker.

@Rich-Harris
Copy link
Member

This will be fixed by #1308, as AMP support is moving from a config option to a transform function that can be used inside handle (and can therefore be turned on or off based on the path). The only wrinkle is that it requires inlineStyleThreshold to be Infinity, unless we come up with some way of replacing stylesheet links.

@Rich-Harris Rich-Harris added this to the 1.0 milestone Apr 23, 2022
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

Successfully merging a pull request may close this issue.

2 participants