From 28ad92bc468b54d4d8745c5cfbfce9a477cb84b9 Mon Sep 17 00:00:00 2001 From: Birk Skyum Date: Sat, 1 Mar 2025 03:46:37 +0100 Subject: [PATCH 1/7] fix client navigation meta tags for router --- .../basic-esbuild-file-based/index.html | 5 ++- .../src/routes/__root.tsx | 3 +- .../index.html | 1 - .../src/routes/__root.tsx | 3 +- e2e/solid-router/basic-file-based/index.html | 1 - .../basic-file-based/src/routes/__root.tsx | 2 ++ .../basic-file-based/src/routes/posts.tsx | 7 ++++ .../basic-file-based/tests/app.spec.ts | 8 +++++ .../basic-scroll-restoration/index.html | 1 - .../basic-scroll-restoration/src/main.tsx | 2 ++ .../basic-solid-query-file-based/index.html | 1 - .../src/routes/__root.tsx | 2 ++ e2e/solid-router/basic-solid-query/index.html | 1 - .../basic-solid-query/src/main.tsx | 2 ++ .../basic-virtual-file-based/index.html | 1 - .../src/routes/root.tsx | 3 +- .../index.html | 1 - .../src/routes/root.tsx | 3 +- e2e/solid-router/basic/index.html | 1 - e2e/solid-router/basic/src/main.tsx | 2 ++ .../src/routes/__root.tsx | 3 +- .../src/routes/root.tsx | 3 +- .../index.html | 1 - .../src/routes/__root.tsx | 2 ++ examples/solid/basic-file-based/index.html | 1 - .../basic-file-based/src/routes/__root.tsx | 3 +- .../basic-solid-query-file-based/index.html | 1 - .../src/routes/__root.tsx | 2 ++ examples/solid/basic-solid-query/index.html | 1 - examples/solid/basic-solid-query/src/main.tsx | 2 ++ .../solid/kitchen-sink-file-based/index.html | 1 - .../src/routes/__root.tsx | 2 ++ .../solid/quickstart-file-based/index.html | 1 - .../src/routes/__root.tsx | 3 +- packages/solid-router/package.json | 1 + packages/solid-router/src/Asset.tsx | 7 ++-- packages/solid-router/src/HeadContent.tsx | 34 ++++++++++++------- packages/solid-router/tests/Scripts.test.tsx | 6 ---- pnpm-lock.yaml | 12 +++++++ 39 files changed, 89 insertions(+), 47 deletions(-) diff --git a/e2e/solid-router/basic-esbuild-file-based/index.html b/e2e/solid-router/basic-esbuild-file-based/index.html index b67448091c..7bfc999143 100644 --- a/e2e/solid-router/basic-esbuild-file-based/index.html +++ b/e2e/solid-router/basic-esbuild-file-based/index.html @@ -3,7 +3,7 @@ - Vite App + - +
diff --git a/e2e/solid-router/basic-esbuild-file-based/src/routes/__root.tsx b/e2e/solid-router/basic-esbuild-file-based/src/routes/__root.tsx index fe8c40d9fa..ac991084e8 100644 --- a/e2e/solid-router/basic-esbuild-file-based/src/routes/__root.tsx +++ b/e2e/solid-router/basic-esbuild-file-based/src/routes/__root.tsx @@ -1,4 +1,4 @@ -import { Link, Outlet, createRootRoute } from '@tanstack/solid-router' +import { HeadContent, Link, Outlet, createRootRoute } from '@tanstack/solid-router' // import { TanStackRouterDevtools } from '@tanstack/router-devtools' export const Route = createRootRoute({ @@ -16,6 +16,7 @@ export const Route = createRootRoute({ function RootComponent() { return ( <> +
- Vite App
diff --git a/e2e/solid-router/basic-file-based-code-splitting/src/routes/__root.tsx b/e2e/solid-router/basic-file-based-code-splitting/src/routes/__root.tsx index 8222611c99..18f7f6447d 100644 --- a/e2e/solid-router/basic-file-based-code-splitting/src/routes/__root.tsx +++ b/e2e/solid-router/basic-file-based-code-splitting/src/routes/__root.tsx @@ -1,4 +1,4 @@ -import { Link, Outlet, createRootRoute } from '@tanstack/solid-router' +import { HeadContent, Link, Outlet, createRootRoute } from '@tanstack/solid-router' // import { TanStackRouterDevtools } from '@tanstack/router-devtools' export const Route = createRootRoute({ @@ -16,6 +16,7 @@ export const Route = createRootRoute({ function RootComponent() { return ( <> +
- Vite App
diff --git a/e2e/solid-router/basic-file-based/src/routes/__root.tsx b/e2e/solid-router/basic-file-based/src/routes/__root.tsx index 8dca5f3104..e24c5fc3fa 100644 --- a/e2e/solid-router/basic-file-based/src/routes/__root.tsx +++ b/e2e/solid-router/basic-file-based/src/routes/__root.tsx @@ -1,4 +1,5 @@ import { + HeadContent, Link, Outlet, createRootRoute, @@ -25,6 +26,7 @@ function RootComponent() { return ( <> +