aboutsummaryrefslogtreecommitdiffstats
path: root/sanity/sanity.config.ts
blob: 0aa425eeb6f2c504bad660fa7a5707883c3f591c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
import {defineConfig} from "sanity";
import {visionTool} from "@sanity/vision";
import {schemaTypes} from "./schemas";
import {withDocumentI18nPlugin} from "@sanity/document-internationalization";
import {baseLanguage, supportedLanguages} from "./schemas/_locales";

export default defineConfig({
  name: "default",
  title: "auroraklinikken.no",
  projectId: process.env.SANITY_STUDIO_API_PROJECT_ID ?? "",
  dataset: process.env.SANITY_STUDIO_API_DATASET ?? "",
  plugins: withDocumentI18nPlugin([visionTool()], {
    languages: supportedLanguages.map((el) => el.iso),
    fallbackLanguageSelect: supportedLanguages.find((l) => l.isDefault)?.iso as any,
  }),
  schema: {
    types: schemaTypes,
  },
});