ampproject / amphtml

The AMP web component framework.
https://amp.dev
Apache License 2.0
14.89k stars 3.89k forks source link

I2I: AMP Runtime Self-Hosting #25873

Open sebastianbenz opened 5 years ago

sebastianbenz commented 5 years ago

Summary

Make it possible for publishers to self-host the AMP runtime, without breaking AMP validity.

Design document

Motivation

The benefits are:

Launch tracker

/cc @ampproject/wg-approvers @mattwomple @honeybadgerdontcare

westonruter commented 3 years ago

And then this would also need to be supported in the RewriteAmpUrls optimizer transformer. Namely, there would need to be a way to prevent the ampRuntimeVersion from being appended to the path in calculateHost(), and then the _replaceUrl() transformer method would need to take a rtv argument to conditionally add the query param if configured to do so.

How would that configuration be supplied? In addition to the ampUrlPrefix should there be a boolean like rtvAsQueryParam that defaults to false?

jridgewell commented 3 years ago

How would that configuration be supplied? In addition to the ampUrlPrefix should there be a boolean like rtvAsQueryParam that defaults to false?

I'm not sure we need both params. Presence of ampUrlPrefix could imply query params.

twifkak commented 3 years ago

Hi, haven't been following closely, but just wanted to include https://github.com/ampproject/amppackager/blob/releases/transformer/transformers/urlrewrite.go in the list of things that might need changing.

samuelspagl commented 1 year ago

Hey there,

as this issue is still open since 2021, I wanted to ask what the current status of this is. I would love to self host part of the AMP runtime for the "Google Webstories" Wordpress plugin.

Thanks a lot in advance!