diff --git a/README.md b/README.md index 4563b20b5..9cb4bf652 100755 --- a/README.md +++ b/README.md @@ -52,7 +52,8 @@ npx nuxi@latest module add sanity 1. Clone this repository 2. Install dependencies using `pnpm install` 3. Stub module with `pnpm dev:prepare` -3. Start development server using `pnpm dev` +4. *Optional: [Import sample development data](/playground/cms/README.md#import-sample-data-optional) into your Sanity Content Lake dataset with* `pnpm studio:import` +5. Start development server using `pnpm dev` ## License diff --git a/package.json b/package.json index 332cba98d..9360eae55 100755 --- a/package.json +++ b/package.json @@ -36,6 +36,7 @@ "dev:build": "nuxt build playground", "dev:prepare": "nuxt-module-build build --stub && nuxt-module-build prepare && nuxt prepare playground", "studio:build": "pnpm --filter nuxt-sanity-cms build", + "studio:import": "pnpm --filter nuxt-sanity-cms import-sample-data", "docs:generate": "nuxt generate docs", "prepare": "simple-git-hooks", "build": "nuxt-module-build build", @@ -110,4 +111,4 @@ "engines": { "node": "^20.19.0 || ^22.0.0 || >=23.0.0" } -} +} \ No newline at end of file diff --git a/playground/cms/README.md b/playground/cms/README.md index 5342a913d..ec1c173c3 100644 --- a/playground/cms/README.md +++ b/playground/cms/README.md @@ -8,3 +8,15 @@ Now you can do the following things: - Check out one of the example frontends: [React](https://github.com/sanity-io/example-frontend-next-js) | [React Native](https://github.com/sanity-io/example-app-react-native) | [Vue](https://github.com/sanity-io/example-frontend-vue-js) | [PHP](https://github.com/sanity-io/example-frontend-silex-twig) - [Join the community Slack](https://slack.sanity.io/?utm_source=readme) - [Extend and build plugins](https://www.sanity.io/docs/content-studio/extending?utm_source=readme) + +#### Import Sample Data (optional) + +*Refactored from [sanity-template-nuxt-clean](https://github.com/sanity-io/sanity-template-nuxt-clean)* + +You may want to start with some sample content and we've got you covered. Run this command from the root of your project to import the provided dataset (sample-data.tar.gz) into your Sanity project. This step is optional but can be helpful for getting started with development quickly. + +This will activate the [Sanity Import CLI](https://www.sanity.io/docs/content-lake/importing-data#d183adde8ef9). + +```shell +pnpm import-sample-data +``` \ No newline at end of file diff --git a/playground/cms/package.json b/playground/cms/package.json index c501570f5..1a572e29d 100644 --- a/playground/cms/package.json +++ b/playground/cms/package.json @@ -10,7 +10,8 @@ "dev": "sanity dev", "build": "sanity build", "start": "sanity start", - "test": "sanity check" + "test": "sanity check", + "import-sample-data": "sanity dataset import sample-data.tar.gz --replace" }, "keywords": [ "sanity" @@ -32,4 +33,4 @@ "engines": { "node": ">=18.0.0" } -} +} \ No newline at end of file diff --git a/playground/cms/sample-data.tar.gz b/playground/cms/sample-data.tar.gz new file mode 100644 index 000000000..7f0eebf0e Binary files /dev/null and b/playground/cms/sample-data.tar.gz differ