Google AMP + Redwood JS

:wave: Hey RedwoodJS Community,

I’ve been loving using RedwoodJS to build out a side project, and recently have wanted to make the main marketing webpage for the site (/) respect the Google AMP Spec.

Given Redwood is opinionated I figured the best way to do this was to statically serve the home page unrestricted from Redwood’s framework.

What’s the best way to do this? I’m currently hosting the project on Netlify and I know the server boots up with yarn rw dev which then utilizes the Routes.js file for routing which all start off with the base index.html. Is it possible to bifurcate which html file is loaded on start up, and say, use amp.html to load amp pages instead of index.html?

Or is it better to detect the path somehow on page load and remove assets/meta tags depending on if the route is /?

Open to any and all suggestions :slight_smile:

Thanks,
Brent

1 Like