Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ There are two route shapes:
- Files with a default export become UI routes.
- Files that export HTTP method names such as `GET` or `POST` become API routes.

You can read more about handler exports in [API routes](/v2/solid-start/building-your-application/api-routes).
You can read more about handler exports in [API routes](/solid-start/v2/building-your-application/api-routes).

## Basic filename mapping

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ description: >-

Use an API route when you need a route that returns data or handles incoming HTTP requests instead of rendering page UI.

A file becomes an API route when it exports one or more HTTP method names such as [`GET`](/v2/solid-start/reference/server/get), `POST`, `PATCH`, or `DELETE`.
A file becomes an API route when it exports one or more HTTP method names such as [`GET`](/solid-start/v2/reference/server/get), `POST`, `PATCH`, or `DELETE`.

## Create an API route

Expand Down Expand Up @@ -87,4 +87,4 @@ API routes are a good fit when you need:
- auth callback handlers
- routes that return non-HTML responses

If the data is only needed by your route UI, prefer [Data fetching](/v2/solid-start/building-your-application/data-fetching) or [Data mutation](/v2/solid-start/building-your-application/data-mutation) before introducing a separate API boundary.
If the data is only needed by your route UI, prefer [Data fetching](/solid-start/v2/building-your-application/data-fetching) or [Data mutation](/solid-start/v2/building-your-application/data-mutation) before introducing a separate API boundary.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ description: >-
---

Mutations run through Solid Router's [`action`](/solid-router/reference/data-apis/action) API.
When a mutation must run on the server, place the [`"use server"`](/v2/solid-start/reference/server/use-server) directive inside the action body.
When a mutation must run on the server, place the [`"use server"`](/solid-start/v2/reference/server/use-server) directive inside the action body.

## Handle form submissions with actions

Expand Down Expand Up @@ -109,4 +109,4 @@ export default function ProjectPage(props: { params: { id: string } }) {
When a mutation changes data that is also loaded by a route `query`, keep the read path and write path close together.
That makes it easier to reason about revalidation behavior through the Solid Router data APIs.

Read this page together with [Data fetching](/v2/solid-start/building-your-application/data-fetching).
Read this page together with [Data fetching](/solid-start/v2/building-your-application/data-fetching).
2 changes: 1 addition & 1 deletion src/routes/solid-start/v2/(0)index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,4 @@ The core model carries over from v1:

Configuration moved from `app.config.ts` to `vite.config.ts` through `solidStart()`.

If you are upgrading an existing app, start with the [migration guide](/v2/solid-start/migrating-from-v1).
If you are upgrading an existing app, start with the [migration guide](/solid-start/v2/migrating-from-v1).
4 changes: 2 additions & 2 deletions src/routes/solid-start/v2/(1)advanced/(4)serialization.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -56,5 +56,5 @@ Because these values are transferred directly, this can yield smaller payloads f

## Related

- [Data fetching](/v2/solid-start/building-your-application/data-fetching)
- [Data mutation](/v2/solid-start/building-your-application/data-mutation)
- [Data fetching](/solid-start/v2/building-your-application/data-fetching)
- [Data mutation](/solid-start/v2/building-your-application/data-mutation)
4 changes: 2 additions & 2 deletions src/routes/solid-start/v2/(1)getting-started.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ For example:
- `src/routes/about.tsx` becomes `/about`
- `src/routes/api/ping.ts` can expose `/api/ping`

Read [Routing](/v2/solid-start/building-your-application/routing) next if you want the exact filename conventions.
Read [Routing](/solid-start/v2/building-your-application/routing) next if you want the exact filename conventions.

## Type support

Expand All @@ -88,4 +88,4 @@ Add it to your TypeScript config if your template has not already done so.
}
```

If you are migrating an existing app instead of creating a new one, continue with [Migrating from v1](/v2/solid-start/migrating-from-v1).
If you are migrating an existing app instead of creating a new one, continue with [Migrating from v1](/solid-start/v2/migrating-from-v1).
2 changes: 1 addition & 1 deletion src/routes/solid-start/v2/reference/client/client-only.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -72,4 +72,4 @@ export default function Page() {

## Related

- [Routing](/v2/solid-start/building-your-application/routing)
- [Routing](/solid-start/v2/building-your-application/routing)
Original file line number Diff line number Diff line change
Expand Up @@ -60,4 +60,4 @@ export default function App() {

## Related

- [Routing](/v2/solid-start/building-your-application/routing)
- [Routing](/solid-start/v2/building-your-application/routing)
Original file line number Diff line number Diff line change
Expand Up @@ -65,4 +65,4 @@ export default createMiddleware([

## Related

- [API routes](/v2/solid-start/building-your-application/api-routes)
- [API routes](/solid-start/v2/building-your-application/api-routes)
Original file line number Diff line number Diff line change
Expand Up @@ -55,4 +55,4 @@ const meta = getServerFunctionMeta();

## Related

- [`"use server"`](/v2/solid-start/reference/server/use-server)
- [`"use server"`](/solid-start/v2/reference/server/use-server)
2 changes: 1 addition & 1 deletion src/routes/solid-start/v2/reference/server/get.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -58,4 +58,4 @@ const handler = GET(getMessage);

## Related

- [Data fetching](/v2/solid-start/building-your-application/data-fetching)
- [Data fetching](/solid-start/v2/building-your-application/data-fetching)
2 changes: 1 addition & 1 deletion src/routes/solid-start/v2/reference/server/use-server.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -73,4 +73,4 @@ export const logMessage = query(async (message: string) => {

## Related

- [`getServerFunctionMeta`](/v2/solid-start/reference/server/get-server-function-meta)
- [`getServerFunctionMeta`](/solid-start/v2/reference/server/get-server-function-meta)
7 changes: 5 additions & 2 deletions vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,10 @@ export default defineConfig({
themeConfig: {
sidebar: {
"/solid-start": createFilesystemSidebar(
"./src/routes/solid-start"
"./src/routes/solid-start",
{
filter: (item) => !item.filePath.includes("/solid-start/v2"),
}
),
},
},
Expand All @@ -108,7 +111,7 @@ export default defineConfig({
title: "SolidStart",
themeConfig: {
sidebar: {
"/v2/solid-start": createFilesystemSidebar(
"/solid-start/v2": createFilesystemSidebar(
"./src/routes/solid-start/v2"
),
},
Expand Down
Loading