Skip to content
Closed
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
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -110,4 +111,4 @@
"engines": {
"node": "^20.19.0 || ^22.0.0 || >=23.0.0"
}
}
}
12 changes: 12 additions & 0 deletions playground/cms/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```
5 changes: 3 additions & 2 deletions playground/cms/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -32,4 +33,4 @@
"engines": {
"node": ">=18.0.0"
}
}
}
Binary file added playground/cms/sample-data.tar.gz
Binary file not shown.