Skip to content
Open
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
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,8 @@
# lerna files
/lerna-debug.log

.vscode/
# VSCode files
.vscode/

# Sanity files
.sanity/
3,579 changes: 1,740 additions & 1,839 deletions package-lock.json

Large diffs are not rendered by default.

11 changes: 11 additions & 0 deletions sanity/deskStructure.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
export default (S) => S.list().title('Content').items([
S.listItem()
.title('Settings')
.child(
S.editor()
.id('settings')
.schemaType('settings')
.documentId('settings')
),
...S.documentTypeListItems().filter(listItem => !['settings'].includes(listItem.getId()))
])
17 changes: 6 additions & 11 deletions sanity/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,23 +9,18 @@
"scripts": {
"start": "sanity start",
"build": "sanity build",
"graphql-deploy": "sanity graphql deploy --playground"
"graphql-deploy": "sanity graphql deploy --playground",
"dev": "sanity dev"
},
"keywords": [
"sanity"
],
"dependencies": {
"@sanity/base": "^2.33.0",
"@sanity/core": "^2.33.0",
"@sanity/default-layout": "^2.33.0",
"@sanity/default-login": "^2.33.0",
"@sanity/desk-tool": "^2.33.0",
"@sanity/eslint-config-studio": "^2.0.0",
"@sanity/vision": "^2.33.0",
"@sanity/eslint-config-studio": "^3.0.1",
"@sanity/vision": "^3.18.1",
"eslint": "^8.6.0",
"prop-types": "^15.7",
"react": "^17.0",
"react-dom": "^17.0",
"prop-types": "^15.8.1",
"sanity": "^3.18.1",
"styled-components": "^5.2.0"
},
"devDependencies": {
Expand Down
8 changes: 8 additions & 0 deletions sanity/sanity.cli.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import {defineCliConfig} from 'sanity/cli'

export default defineCliConfig({
api: {
projectId: 'orbitntnu-web', // replace value with your own
dataset: 'zx40gv7m' // replace value with your own
}
})
19 changes: 19 additions & 0 deletions sanity/sanity.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import { defineConfig } from "sanity";
import { deskTool } from 'sanity/desk'
import { visionTool } from '@sanity/vision'
import schemas from './schemas/schema'
import deskStructure from './deskStructure'

export default defineConfig({
title: "orbitntnu-web",
projectId: "zx40gv7m",
dataset: "production",
plugins: [deskTool({
structure: deskStructure
}),
visionTool()
],
schema: {
types: schemas,
},
});
29 changes: 0 additions & 29 deletions sanity/sanity.json

This file was deleted.

59 changes: 26 additions & 33 deletions sanity/schemas/schema.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
import createSchema from "part:@sanity/base/schema-creator";

import schemaTypes from "all:part:@sanity/base/schema-type";

import landingPage from "./landingPage";
import cardLink from "./cardLink";
import footer from "./footer";
Expand All @@ -27,32 +23,29 @@ import selfiesatPage from "./selfiesatPage";
import nextSatPage from "./nextSatPage";
import framsatPage from "./framsatPage";

export default createSchema({
name: "pages",
types: schemaTypes.concat([
landingPage,
selfiesatPage,
aboutPage,
sponsorsPage,
contactPage,
teamsPage,
joinPage,
blogPage,
galleryPage,
suborbitalPage,
notFoundPage,
position,
cardLink,
footer,
someLink,
textLink,
member,
team,
sponsor,
mainSponsorImage,
mainSponsorLargeImage,
specification,
nextSatPage,
framsatPage,
]),
});
export default [
landingPage,
selfiesatPage,
aboutPage,
sponsorsPage,
contactPage,
teamsPage,
joinPage,
blogPage,
galleryPage,
suborbitalPage,
notFoundPage,
position,
cardLink,
footer,
someLink,
textLink,
member,
team,
sponsor,
mainSponsorImage,
mainSponsorLargeImage,
specification,
nextSatPage,
framsatPage,
]
Loading