Skip to content

Commit d9ead5f

Browse files
committed
fix: remove brittle strapi setup command and repair article route
1 parent 3b08c42 commit d9ead5f

File tree

3 files changed

+12
-14
lines changed

3 files changed

+12
-14
lines changed

packages/create/src/frameworks/react/add-ons/strapi/README.md

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
## Strapi CMS Integration
22

3-
This add-on integrates Strapi CMS with your TanStack Start application using the official Strapi Client SDK. The Strapi server is created as a sibling directory during setup.
3+
This add-on integrates Strapi CMS with your TanStack Start application using the official Strapi Client SDK.
44

55
### Features
66

@@ -31,22 +31,28 @@ parent/
3131
│ │ │ └── strapi-utils.ts
3232
│ │ ├── routes/demo/
3333
│ │ │ ├── strapi.tsx # Articles list
34-
│ │ │ └── strapi_.$articleId.tsx # Article detail
34+
│ │ │ └── strapi.$articleId.tsx # Article detail
3535
│ │ └── types/
3636
│ │ └── strapi.ts
3737
│ ├── .env.local
3838
│ └── package.json
39-
└── server/ # Strapi CMS backend (auto-created)
39+
└── server/ # Strapi CMS backend (create manually or use hosted Strapi)
4040
├── src/api/ # Content types
4141
├── config/ # Strapi configuration
4242
└── package.json
4343
```
4444

4545
### Quick Start
4646

47-
The Strapi server is automatically cloned from the official [Strapi Cloud Template Blog](https://github.com/strapi/strapi-cloud-template-blog).
47+
Create your Strapi project separately (or use an existing hosted Strapi instance), then point this app to it with `VITE_STRAPI_URL`.
4848

49-
**1. Install Strapi dependencies:**
49+
**1. Set up Strapi:**
50+
51+
Follow the Strapi quick-start guide to create a local project, or use your existing Strapi deployment:
52+
53+
- https://docs.strapi.io/dev-docs/quick-start
54+
55+
If you created a local Strapi project in a sibling `server` directory, continue with:
5056

5157
```bash
5258
cd ../server

packages/create/src/frameworks/react/add-ons/strapi/assets/src/routes/demo/strapi_.$articleId.tsx renamed to packages/create/src/frameworks/react/add-ons/strapi/assets/src/routes/demo/strapi.$articleId.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { StrapiImage } from "@/components/strapi-image";
44
import { BlockRenderer } from "@/components/blocks";
55
import type { TArticle } from "@/types/strapi";
66

7-
export const Route = createFileRoute("/demo/strapi_/$articleId")({
7+
export const Route = createFileRoute("/demo/strapi/$articleId")({
88
component: RouteComponent,
99
errorComponent: ErrorComponent,
1010
loader: async ({ params }) => {

packages/create/src/frameworks/react/add-ons/strapi/info.json

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,6 @@
88
"color": "#4945FF",
99
"priority": 110,
1010
"modes": ["file-router"],
11-
"dependsOn": ["start"],
12-
"command": {
13-
"command": "sh",
14-
"args": [
15-
"-c",
16-
"cd .. && git clone --depth 1 https://github.com/strapi/strapi-cloud-template-blog.git server && cd server && rm -rf .git .yarnrc.yml yarn.lock && cp .env.example .env"
17-
]
18-
},
1911
"routes": [
2012
{
2113
"url": "/demo/strapi",

0 commit comments

Comments
 (0)