You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add original file path (Relative path from project routes) to route manifest
Create OG Image Vite plugin to build all *.{png,jpg}.jsx files to the dist folder.
In vite plugin, map filepath to ogImg/AboutPage/AboutPage.mjs: this is the og image component
In the middleware, we match a route to the request (after ignoring the extension).
Then we know the original file path, so we can lookup the og image component (and if it doesn't exist, 404)
React hooks to easily get the url
Decision points:
☐ Should playwright be a dependency? Or will it eventually be part of the setup command (or instructions)
☐ Where does ogmiddleware live?
@cannikin and I have a plan!
Add original file path (Relative path from project routes) to route manifest
Create OG Image Vite plugin to build all *.{png,jpg}.jsx files to the dist folder.
In vite plugin, map filepath to ogImg/AboutPage/AboutPage.mjs: this is the og image component
In the middleware, we match a route to the request (after ignoring the extension).
Then we know the original file path, so we can lookup the og image component (and if it doesn't exist, 404)
React hooks to easily get the url
Decision points:
☐ Should playwright be a dependency? Or will it eventually be part of the setup command (or instructions)
☐ Where does ogmiddleware live?
☐ @redwoodjs/og-gen/middleware
☐ @redwoodjs/og-gen/hooks
☐ @redwoodjs/og-gen/plugin
The text was updated successfully, but these errors were encountered: