-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
30 changed files
with
12,346 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"extends": "@sanity/eslint-config-studio" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# Logs | ||
/logs | ||
*.log | ||
|
||
# Coverage directory used by tools like istanbul | ||
/coverage | ||
|
||
# Dependency directories | ||
node_modules | ||
|
||
# Compiled sanity studio | ||
/dist |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# Sanity Blogging 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) | ||
- Check out the example frontend: [React/Next.js](https://github.com/sanity-io/tutorial-sanity-blog-react-next) | ||
- [Read the blog post about this template](https://www.sanity.io/blog/build-your-own-blog-with-sanity-and-next-js?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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"#": "Used by Sanity to keep track of configuration file checksums, do not delete or modify!", | ||
"@sanity/default-layout": "bb034f391ba508a6ca8cd971967cbedeb131c4d19b17b28a0895f32db5d568ea", | ||
"@sanity/default-login": "e2ed4e51e97331c0699ba7cf9f67cbf76f1c6a5f806d6eabf8259b2bcb5f1002", | ||
"@sanity/form-builder": "b38478227ba5e22c91981da4b53436df22e48ff25238a55a973ed620be5068aa", | ||
"@sanity/data-aspects": "d199e2c199b3e26cd28b68dc84d7fc01c9186bf5089580f2e2446994d36b3cb6", | ||
"@sanity/vision": "da5b6ed712703ecd04bf4df560570c668aa95252c6bc1c41d6df1bda9b8b8f60" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"listOptions": {} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"toolSwitcher": { | ||
"order": [], | ||
"hidden": [] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"providers": { | ||
"mode": "append", | ||
"redirectOnSingle": false, | ||
"entries": [] | ||
}, | ||
"loginMethod": "dual" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"images": { | ||
"directUploads": true | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"defaultApiVersion": "2021-10-21" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
{ | ||
"name": "planner", | ||
"private": true, | ||
"version": "1.0.0", | ||
"description": "", | ||
"main": "package.json", | ||
"author": "Daniel Vu <dev.daniel.vu@gmail.com>", | ||
"license": "UNLICENSED", | ||
"scripts": { | ||
"start": "sanity start", | ||
"build": "sanity build" | ||
}, | ||
"keywords": [ | ||
"sanity" | ||
], | ||
"dependencies": { | ||
"@sanity/base": "^2.33.3", | ||
"@sanity/core": "^2.33.3", | ||
"@sanity/default-layout": "^2.33.3", | ||
"@sanity/default-login": "^2.33.3", | ||
"@sanity/desk-tool": "^2.33.3", | ||
"@sanity/eslint-config-studio": "^2.0.0", | ||
"@sanity/vision": "^2.33.3", | ||
"eslint": "^8.6.0", | ||
"prop-types": "^15.7", | ||
"react": "^17.0", | ||
"react-dom": "^17.0", | ||
"styled-components": "^5.2.0" | ||
}, | ||
"devDependencies": {}, | ||
"repository": { | ||
"type": "git", | ||
"url": "git@github.com:dv297/planner.git" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
User-specific packages can be placed here |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
{ | ||
"root": true, | ||
"project": { | ||
"name": "planner" | ||
}, | ||
"api": { | ||
"projectId": "vvbj94z0", | ||
"dataset": "production" | ||
}, | ||
"plugins": [ | ||
"@sanity/base", | ||
"@sanity/default-layout", | ||
"@sanity/default-login", | ||
"@sanity/desk-tool" | ||
], | ||
"env": { | ||
"development": { | ||
"plugins": [ | ||
"@sanity/vision" | ||
] | ||
} | ||
}, | ||
"parts": [ | ||
{ | ||
"name": "part:@sanity/base/schema", | ||
"path": "./schemas/schema" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
export default { | ||
name: 'author', | ||
title: 'Author', | ||
type: 'document', | ||
fields: [ | ||
{ | ||
name: 'name', | ||
title: 'Name', | ||
type: 'string', | ||
}, | ||
{ | ||
name: 'slug', | ||
title: 'Slug', | ||
type: 'slug', | ||
options: { | ||
source: 'name', | ||
maxLength: 96, | ||
}, | ||
}, | ||
{ | ||
name: 'image', | ||
title: 'Image', | ||
type: 'image', | ||
options: { | ||
hotspot: true, | ||
}, | ||
}, | ||
{ | ||
name: 'bio', | ||
title: 'Bio', | ||
type: 'array', | ||
of: [ | ||
{ | ||
title: 'Block', | ||
type: 'block', | ||
styles: [{title: 'Normal', value: 'normal'}], | ||
lists: [], | ||
}, | ||
], | ||
}, | ||
], | ||
preview: { | ||
select: { | ||
title: 'name', | ||
media: 'image', | ||
}, | ||
}, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
/** | ||
* This is the schema definition for the rich text fields used for | ||
* for this blog studio. When you import it in schemas.js it can be | ||
* reused in other parts of the studio with: | ||
* { | ||
* name: 'someName', | ||
* title: 'Some title', | ||
* type: 'blockContent' | ||
* } | ||
*/ | ||
export default { | ||
title: 'Block Content', | ||
name: 'blockContent', | ||
type: 'array', | ||
of: [ | ||
{ | ||
title: 'Block', | ||
type: 'block', | ||
// Styles let you set what your user can mark up blocks with. These | ||
// correspond with HTML tags, but you can set any title or value | ||
// you want and decide how you want to deal with it where you want to | ||
// use your content. | ||
styles: [ | ||
{title: 'Normal', value: 'normal'}, | ||
{title: 'H1', value: 'h1'}, | ||
{title: 'H2', value: 'h2'}, | ||
{title: 'H3', value: 'h3'}, | ||
{title: 'H4', value: 'h4'}, | ||
{title: 'Quote', value: 'blockquote'}, | ||
], | ||
lists: [{title: 'Bullet', value: 'bullet'}], | ||
// Marks let you mark up inline text in the block editor. | ||
marks: { | ||
// Decorators usually describe a single property – e.g. a typographic | ||
// preference or highlighting by editors. | ||
decorators: [ | ||
{title: 'Strong', value: 'strong'}, | ||
{title: 'Emphasis', value: 'em'}, | ||
], | ||
// Annotations can be any object structure – e.g. a link or a footnote. | ||
annotations: [ | ||
{ | ||
title: 'URL', | ||
name: 'link', | ||
type: 'object', | ||
fields: [ | ||
{ | ||
title: 'URL', | ||
name: 'href', | ||
type: 'url', | ||
}, | ||
], | ||
}, | ||
], | ||
}, | ||
}, | ||
// You can add additional types here. Note that you can't use | ||
// primitive types such as 'string' and 'number' in the same array | ||
// as a block type. | ||
{ | ||
type: 'image', | ||
options: {hotspot: true}, | ||
}, | ||
], | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
export default { | ||
name: 'category', | ||
title: 'Category', | ||
type: 'document', | ||
fields: [ | ||
{ | ||
name: 'title', | ||
title: 'Title', | ||
type: 'string', | ||
}, | ||
{ | ||
name: 'description', | ||
title: 'Description', | ||
type: 'text', | ||
}, | ||
], | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
export default { | ||
name: 'post', | ||
title: 'Post', | ||
type: 'document', | ||
fields: [ | ||
{ | ||
name: 'title', | ||
title: 'Title', | ||
type: 'string', | ||
}, | ||
{ | ||
name: 'slug', | ||
title: 'Slug', | ||
type: 'slug', | ||
options: { | ||
source: 'title', | ||
maxLength: 96, | ||
}, | ||
}, | ||
{ | ||
name: 'author', | ||
title: 'Author', | ||
type: 'reference', | ||
to: {type: 'author'}, | ||
}, | ||
{ | ||
name: 'mainImage', | ||
title: 'Main image', | ||
type: 'image', | ||
options: { | ||
hotspot: true, | ||
}, | ||
}, | ||
{ | ||
name: 'categories', | ||
title: 'Categories', | ||
type: 'array', | ||
of: [{type: 'reference', to: {type: 'category'}}], | ||
}, | ||
{ | ||
name: 'publishedAt', | ||
title: 'Published at', | ||
type: 'datetime', | ||
}, | ||
{ | ||
name: 'body', | ||
title: 'Body', | ||
type: 'blockContent', | ||
}, | ||
], | ||
|
||
preview: { | ||
select: { | ||
title: 'title', | ||
author: 'author.name', | ||
media: 'mainImage', | ||
}, | ||
prepare(selection) { | ||
const {author} = selection | ||
return Object.assign({}, selection, { | ||
subtitle: author && `by ${author}`, | ||
}) | ||
}, | ||
}, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
// 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' | ||
|
||
// We import object and document schemas | ||
import blockContent from './blockContent' | ||
import category from './category' | ||
import post from './post' | ||
import author from './author' | ||
|
||
// 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([ | ||
// The following are document types which will appear | ||
// in the studio. | ||
post, | ||
author, | ||
category, | ||
// When added to this list, object types can be used as | ||
// { type: 'typename' } in other document schemas | ||
blockContent, | ||
]), | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"] | ||
} |
Oops, something went wrong.