uvue icon indicating copy to clipboard operation
uvue copied to clipboard

AMP

Open Grawl opened this issue 5 years ago • 1 comments
trafficstars

Is your feature request related to a problem? Please describe.

I want to use uVue to create routes for amp.dev. Is there any ready-to-use guides on how to make it possible?

Describe the solution you'd like

A plugin? A guide? A StackOverflow answer?

Describe alternatives you've considered

It's easy to start as I see:

  1. Create new route, for example, '/article/:id/amp'
  2. Duplicate component from original route and remove all runtime code
  3. Link to AMP route from original route using vue-meta, like this: <link rel="amphtml" href="https://www.example.com/article/<id>/amp"> (and the same for AMP to original)
  4. Remove Vue JS bundles from this route
  5. How about router? It's now handled by AMP?

Grawl avatar Mar 09 '20 05:03 Grawl

for now, I just modify response.body on rendered(response, context, app) hook with PostHTML

https://gist.github.com/Grawl/ee90f967e7104142cc36516c7026ea39

Grawl avatar Mar 11 '20 10:03 Grawl