Running Intertia Django with SSR #2263
Replies: 2 comments 2 replies
-
The |
Beta Was this translation helpful? Give feedback.
-
Thank You @RobertBoes . I have seen a svelte example that has helped https://github.com/pmdevita/Django-Svelte-Template. However I have realised it doesn't update the SEO in the . Is there a workaround to that ? Here is the sample code I am using . import React from 'react'
import { Head } from '@inertiajs/react'
type EventDetailPageProps = {
event: AppEvent,
seoData?:SEOData
}
const Show :React.FC<EventDetailPageProps> = ({event ,seoData}) => {
return (
<div className="container mx-auto p-4">
{/* seo data */}
{seoData && (
<Head>
<title>{seoData.title}</title>
<meta name="description" content={seoData.description} />
</Head>
)}
<h1 className="text-4xl font-bold">Event: {event.name}</h1>
<p className="text-lg">Details about the event will go here.</p>
</div>
)
}
export default Show
Thank you |
Beta Was this translation helpful? Give feedback.
-
I have recently been exploring inertiajs.
It's pretty good but there isnot enough context on how to run it in ssr mode .
Laravel has the commands for php artisan inertia:start-ssr at the start Command(https://github.com/inertiajs/inertia-laravel/blob/2.x/src/Commands/StartSsr.php) .
I needed to create a similar command for django to start ssr server that can be used for bundling the application ?
How do i get started considering i have already defined the
ssr.js
file and intertia is working for my django project.Thank You.
Beta Was this translation helpful? Give feedback.
All reactions