-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Fix: migrate gumroad blog to inertia #3214
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Fix: migrate gumroad blog to inertia #3214
Conversation
…o-inertia resolve merge conflicts
| layout "gumroad_blog" | ||
| layout "inertia" | ||
|
|
||
| before_action :hide_layouts |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed layout from gumroad_blog to inertia and removed hide_layouts before_action since Inertia handles layouts differently.
| @@ -33,7 +36,11 @@ def index | |||
| def show | |||
| authorize @post, policy_class: GumroadBlog::PostsPolicy | |||
|
|
|||
| @props = PostPresenter.new(pundit_user: pundit_user, post: @post, purchase_id_param: nil).post_component_props | |||
| set_meta_tag(title: @post.subject) | |||
| set_meta_tag(property: "og:title", value: @post.subject) | |||
| set_meta_tag(property: "og:description", value: @post.message_snippet) | |||
|
|
|||
| render inertia: "GumroadBlog/Show", props: PostPresenter.new(pundit_user: pundit_user, post: @post, purchase_id_param: nil).post_component_props | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed from assigning @props instance variable to directly using render inertia: with the component path GumroadBlog/Index and inline props hash.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
New shared footer component extracted for reuse. Contains:
- Social media icon SVG components (X, YouTube, Instagram, Facebook, Pinterest)
- Email subscription form with state management
- Navigation links using Inertia's Link component
- Styled with Tailwind CSS matching Gumroad's home page design
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
New shared navigation component extracted for reuse. Contains:
- NavLink component for consistent navigation styling with active state support
- GitHub stars badge that fetches from GitHub API
- Mobile hamburger menu with toggle animation
- Dark mode support via Tailwind's dark: prefix
- Uses usePage() to determine active navigation item
- Shows Dashboard link for logged-in users, or Login/Start selling for guests
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
New Inertia page component for showing individual blog posts. Key changes from the old server component:
- Uses usePage().props to get props from Inertia context
- Wrapped with HomeNav and HomeFooter components
- Uses Inertia Link for "Back to Blog" navigation
- Removed scoped-tailwind-preflight from BackToBlog since it's already wrapped in parent
- Added LoggedInUserLayout for consistent layout handling
Issue: #3056
Description:
This PR migrates the Gumroad Blog pages (/blog index and /blog/:slug show) from server-rendered ERB views with React hydration to Inertia.js.
Changes
@propsfor ERB templatesBefore/After
Test Results
Checklist
AI Disclosure
IDE: Cursor
Model: Claude Sonnet 4.5
Purpose: creating migration plan