create-puck-app 0.10.1-canary.cc20c52 → 0.11.0-canary.5881e1b
Sign up to get free protection for your applications and to get access to all the features.
- package/package.json +1 -1
- package/scripts/generate.js +1 -1
- package/templates/next/README.md +5 -2
package/package.json
CHANGED
package/scripts/generate.js
CHANGED
package/templates/next/README.md
CHANGED
@@ -7,6 +7,7 @@ The `next` recipe showcases one of the most powerful ways to implement Puck usin
|
|
7
7
|
- Next.js 13 App Router implementation
|
8
8
|
- JSON database implementation with HTTP API
|
9
9
|
- Catch-all routes to use puck for any route on the platform
|
10
|
+
- Incremental static regeneration (ISR) for all Puck pages
|
10
11
|
|
11
12
|
## Usage
|
12
13
|
|
@@ -30,10 +31,12 @@ You can do this for any route on the application, **even if the page doesn't exi
|
|
30
31
|
|
31
32
|
To adopt this recipe you will need to:
|
32
33
|
|
33
|
-
- **IMPORTANT** Add authentication to `/edit` routes. This can be done by modifying the example API routes in `/app/api/
|
34
|
-
- Integrate your database into the API calls in `/app/api/
|
34
|
+
- **IMPORTANT** Add authentication to `/edit` routes. This can be done by modifying the example API routes in `/app/puck/api/route.ts` and server component in `/app/puck/[...puckPath]/page.tsx`. **If you don't do this, Puck will be completely public.**
|
35
|
+
- Integrate your database into the API calls in `/app/puck/api/route.ts`
|
35
36
|
- Implement a custom puck configuration in `puck.config.tsx`
|
36
37
|
|
38
|
+
By default, this recipe will generate static pages by setting `dynamic` to [`force-static`](https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config#dynamic) in the `/app/[...puckPath]/page.tsx`. This will strip headers and cookies. If you need dynamic pages, you can delete this.
|
39
|
+
|
37
40
|
## License
|
38
41
|
|
39
42
|
MIT © [Measured Co.](https://github.com/measuredco)
|