From 3513d6290276b4834a6e85082042b711f94f43ce Mon Sep 17 00:00:00 2001 From: Dennis van den Brock <72552171+Shweit@users.noreply.github.com> Date: Thu, 6 Nov 2025 11:38:13 +0100 Subject: [PATCH] fix: fix application layout template MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The example layout template in the documentation was missing the vite_typescript_tag for the Inertia TypeScript entrypoint. As a result, the Inertia app wouldn’t load when following the provided setup. This commit updates the template to include the missing import and improves the overall completeness of the example. --- docs/guide/server-side-setup.md | 47 +++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) diff --git a/docs/guide/server-side-setup.md b/docs/guide/server-side-setup.md index 510c5f0e..536995e0 100644 --- a/docs/guide/server-side-setup.md +++ b/docs/guide/server-side-setup.md @@ -116,14 +116,44 @@ First, setup the root template that will be loaded on the first page visit. This + <%= content_for(:title) || "Inertia Rails Poc" %> + + + + <%= csrf_meta_tags %> <%= csp_meta_tag %> + <%= yield :head %> + + <%# Enable PWA manifest for installable apps (make sure to enable in config/routes.rb too!) %> + <%#= tag.link rel: "manifest", href: pwa_manifest_path(format: :json) %> + + + + + <%= inertia_ssr_head %> <%# If you want to use React add `vite_react_refresh_tag` %> <%= vite_client_tag %> + + <%# Includes all stylesheet files in app/assets/stylesheets %> + <%= stylesheet_link_tag :app %> + + <%= vite_typescript_tag "inertia" %> + <%= vite_stylesheet_tag "application" %> <%= vite_javascript_tag 'application' %> + + @@ -138,11 +168,28 @@ First, setup the root template that will be loaded on the first page visit. This + <%= content_for(:title) || "Inertia Rails Poc" %> + + + + <%= csrf_meta_tags %> <%= csp_meta_tag %> + <%= yield :head %> + + <%# Enable PWA manifest for installable apps (make sure to enable in config/routes.rb too!) %> + <%#= tag.link rel: "manifest", href: pwa_manifest_path(format: :json) %> + + + + + <%= inertia_ssr_head %> + <%# Includes all stylesheet files in app/assets/stylesheets %> + <%= stylesheet_link_tag :app %> + <%= stylesheet_pack_tag 'application' %> <%= javascript_pack_tag 'application', defer: true %>