From ce54d0ea4257def8501894371013ee3f7a57e1a6 Mon Sep 17 00:00:00 2001 From: Simeon Griggs Date: Mon, 28 Oct 2024 23:13:57 +0000 Subject: [PATCH] Update packages/@sanity/cli/src/actions/init-project/templates/nextjs/index.ts Add explanation to live.ts Co-authored-by: Espen Hovlandsdal --- .../cli/src/actions/init-project/templates/nextjs/index.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/@sanity/cli/src/actions/init-project/templates/nextjs/index.ts b/packages/@sanity/cli/src/actions/init-project/templates/nextjs/index.ts index 112142ab879..b0c9b407afd 100644 --- a/packages/@sanity/cli/src/actions/init-project/templates/nextjs/index.ts +++ b/packages/@sanity/cli/src/actions/init-project/templates/nextjs/index.ts @@ -165,6 +165,9 @@ export const client = createClient({ }) ` +// Importing and querying through `sanityFetch` from this file will make data automatically stay up to date with any changes. +// Before using it, import and render `` in your layout - see +// https://github.com/sanity-io/next-sanity#live-content-api for more information. const live = `import { defineLive } from "next-sanity"; import { client } from './client'