-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
initial setup sanity ISSUES CLOSED: #4591
- Loading branch information
1 parent
3e89981
commit 14846e0
Showing
7 changed files
with
30,246 additions
and
20,238 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 |
---|---|---|
@@ -1,2 +1,5 @@ | ||
DATABASE_URI=postgresql://localhost/jokul-portal | ||
PAYLOAD_SECRET=YOUR_SECRET_HERE | ||
SANITY_STUDIO_PROJECT_ID=<project_id> | ||
SANITY_STUDIO_DATASET=<dataset> | ||
SANITY_API_READ_TOKEN=<api_read_token> |
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
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 @@ | ||
import { visionTool } from "@sanity/vision"; | ||
import { defineConfig } from "sanity"; | ||
import { structureTool } from "sanity/structure"; | ||
import { schemaTypes } from "./sanity/schemas"; | ||
|
||
export default defineConfig({ | ||
name: "portal-sanity-studio", | ||
basePath: "/studio", | ||
title: "portal-sanity-studio", | ||
projectId: process.env.NEXT_PUBLIC_SANITY_STUDIO_PROJECT_ID || "", | ||
dataset: process.env.NEXT_PUBLIC_SANITY_STUDIO_DATASET || "test", | ||
token: process.env.SANITY_API_READ_TOKEN || "", | ||
plugins: [structureTool(), visionTool()], | ||
schema: { | ||
types: schemaTypes, | ||
}, | ||
}); |
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 @@ | ||
export const schemaTypes = []; |
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 @@ | ||
"use client"; | ||
|
||
import { NextStudio } from "next-sanity/studio"; | ||
import config from "../../../../sanity.config"; | ||
|
||
export default function Studio() { | ||
return <NextStudio config={config} />; | ||
} |
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 const metadata = { | ||
title: "Jøkul Portal Studio", | ||
description: | ||
"Velkommen til Jøkul Portal Studio. Her kan du redigere innholdet på Portalen.", | ||
}; | ||
|
||
export default function RootLayout({ | ||
children, | ||
}: { | ||
children: React.ReactNode; | ||
}) { | ||
return ( | ||
<html lang="en"> | ||
<body>{children}</body> | ||
</html> | ||
); | ||
} |
Oops, something went wrong.