Replies: 1 comment
-
I've long wanted to have some sort of middleware that would allow content to be mutated before processing, and would definitely be open to this. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
The only reason I was able to add AMP into my blog was because of the custom parser hack. When thinking about other ways to implement this, I imagined some kind of proxy class, like a Laravel middleware, that can mutate the content.
This would work on "route" level. You can currently provide an array of paths for an article (maybe
['main' => 'post/:slug', 'amp' => 'post/:slug/amp']
), so I could attach one of this middlewares to the amp route and convert the HTML to AMP-HTML there.Is this someone you'd want on Jigsaw? If so, I can come up with an initial implementation and PR it :)
Beta Was this translation helpful? Give feedback.
All reactions