Skip to content

Commit

Permalink
Sanity boilerplate
Browse files Browse the repository at this point in the history
  • Loading branch information
RobEasthope committed Aug 6, 2021
1 parent afe5a53 commit 60dfdd4
Show file tree
Hide file tree
Showing 15 changed files with 10,167 additions and 0 deletions.
51 changes: 51 additions & 0 deletions sanity/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
/node_modules
/.pnp
.pnp.js

# testing
/coverage

# next.js
/.next/
/out/

# next-sitemap
public/sitemap.xml
public/robots.txt

# storybook
/storybook-static

# production
/build

# misc
.DS_Store
*.pem

# debug
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# local env files
.env
.env.local
.env.development.local
.env.test.local
.env.production.local

# vercel
.vercel

# yarn
.yarn/*
!.yarn/patches
!.yarn/releases
!.yarn/plugins
!.yarn/sdks
!.yarn/versions
.pnp.*
9 changes: 9 additions & 0 deletions sanity/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Sanity Clean Content Studio

Congratulations, you have now installed the Sanity Content Studio, an open source real-time content editing environment connected to the Sanity backend.

Now you can do the following things:

- [Read “getting started” in the docs](https://www.sanity.io/docs/introduction/getting-started?utm_source=readme)
- [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)
7 changes: 7 additions & 0 deletions sanity/config/.checksums
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"#": "Used by Sanity to keep track of configuration file checksums, do not delete or modify!",
"@sanity/default-layout": "bb034f391ba508a6ca8cd971967cbedeb131c4d19b17b28a0895f32db5d568ea",
"@sanity/default-login": "6fb6d3800aa71346e1b84d95bbcaa287879456f2922372bb0294e30b968cd37f",
"@sanity/form-builder": "b38478227ba5e22c91981da4b53436df22e48ff25238a55a973ed620be5068aa",
"@sanity/data-aspects": "d199e2c199b3e26cd28b68dc84d7fc01c9186bf5089580f2e2446994d36b3cb6"
}
3 changes: 3 additions & 0 deletions sanity/config/@sanity/data-aspects.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"listOptions": {}
}
6 changes: 6 additions & 0 deletions sanity/config/@sanity/default-layout.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"toolSwitcher": {
"order": [],
"hidden": []
}
}
7 changes: 7 additions & 0 deletions sanity/config/@sanity/default-login.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"providers": {
"mode": "append",
"redirectOnSingle": false,
"entries": []
}
}
5 changes: 5 additions & 0 deletions sanity/config/@sanity/form-builder.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"images": {
"directUploads": true
}
}
33 changes: 33 additions & 0 deletions sanity/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
"name": "triton",
"private": true,
"version": "1.0.0",
"description": "",
"main": "package.json",
"author": "Rob Easthope <hello@robeasthope.com>",
"license": "UNLICENSED",
"scripts": {
"start": "sanity start",
"build": "sanity build"
},
"keywords": [
"sanity"
],
"dependencies": {
"@sanity/base": "^2.13.1",
"@sanity/components": "^2.13.0",
"@sanity/core": "^2.13.1",
"@sanity/default-layout": "^2.13.1",
"@sanity/default-login": "^2.13.1",
"@sanity/desk-tool": "^2.13.1",
"@sanity/vision": "^2.13.1",
"prop-types": "^15.7",
"react": "^17.0",
"react-dom": "^17.0"
},
"devDependencies": {},
"repository": {
"type": "git",
"url": "https://github.com/RobEasthope/triton.git"
}
}
1 change: 1 addition & 0 deletions sanity/plugins/.gitkeep
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
User-specific packages can be placed here
30 changes: 30 additions & 0 deletions sanity/sanity.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"root": true,
"project": {
"name": "Triton"
},
"api": {
"projectId": "xtxdr2ns",
"dataset": "production"
},
"plugins": [
"@sanity/base",
"@sanity/components",
"@sanity/default-layout",
"@sanity/default-login",
"@sanity/desk-tool"
],
"env": {
"development": {
"plugins": [
"@sanity/vision"
]
}
},
"parts": [
{
"name": "part:@sanity/base/schema",
"path": "./schemas/schema"
}
]
}
16 changes: 16 additions & 0 deletions sanity/schemas/schema.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
// First, we must import the schema creator
import createSchema from 'part:@sanity/base/schema-creator'

// Then import schema types from any plugins that might expose them
import schemaTypes from 'all:part:@sanity/base/schema-type'

// Then we give our schema to the builder and provide the result to Sanity
export default createSchema({
// We name our schema
name: 'default',
// Then proceed to concatenate our document type
// to the ones provided by any plugins that are installed
types: schemaTypes.concat([
/* Your types here! */
]),
})
1 change: 1 addition & 0 deletions sanity/static/.gitkeep
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Files placed here will be served by the Sanity server under the `/static`-prefix
Binary file added sanity/static/favicon.ico
Binary file not shown.
6 changes: 6 additions & 0 deletions sanity/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
// Note: This config is only used to help editors like VS Code understand/resolve
// parts, the actual transpilation is done by babel. Any compiler configuration in
// here will be ignored.
"include": ["./node_modules/@sanity/base/types/**/*.ts", "./**/*.ts", "./**/*.tsx"]
}
Loading

0 comments on commit 60dfdd4

Please sign in to comment.