1
0
Fork 0
mirror of https://ark.sudovanilla.org/Korbs/butterflyvu.git synced 2024-12-23 07:43:55 +00:00

Add Keystatic config

This commit is contained in:
Korbs 2024-06-07 03:16:30 -04:00
parent b06a135e18
commit 713141279b

48
keystatic.config.ts Normal file
View file

@ -0,0 +1,48 @@
// Environment Variables
const CMS_DASHBOARD_LOGO_DARK = import.meta.env.CMS_DASHBOARD_LOGO_DARK;
const CMS_DASHBOARD_LOGO_LIGHT = import.meta.env.CMS_DASHBOARD_LOGO_LIGHT;
// Components
import { Link } from '@iconoir/vue';
import { config, fields, collection } from '@keystatic/core';
import { block, inline, wrapper } from '@keystatic/core/content-components'
export default config({
// https://keystatic.com/docs/user-interface
ui: {
brand: {
name: 'Document CMS',
},
mark: ({ colorScheme }) => {
let path = colorScheme === 'dark'
? CMS_DASHBOARD_LOGO_DARK // For Dark Theme
: CMS_DASHBOARD_LOGO_LIGHT; // For Light Theme
},
navigation: {
'Documents': ['docs']
},
},
// https://keystatic.com/docs/local-mode
storage: {
kind: 'local',
},
// https://keystatic.com/docs/collections
collections: {
docs: collection({
label: 'Documents',
slugField: 'title',
path: 'src/content/docs/*',
format: { contentField: 'content' },
entryLayout: 'content',
schema: {
title: fields.slug({ name: { label: 'Title' } }),
content: fields.mdx({
label: 'Content',
formatting: true,
dividers: true,
links: true,
}),
},
}),
},
});