feat: add rootNotionSpaceId optional config

This commit is contained in:
Travis Fischer
2021-02-01 18:42:05 -05:00
parent 09bb0cefef
commit 49a8cca397
3 changed files with 15 additions and 1 deletions

View File

@@ -5,10 +5,20 @@
* for optional depenencies.
*/
import { parsePageId } from 'notion-utils'
import { getSiteConfig, getEnv } from './get-config-value'
// where it all starts -- the site's root Notion page
export const rootNotionPageId: string = getSiteConfig('rootNotionPageId')
export const rootNotionPageId: string = parsePageId(
getSiteConfig('rootNotionPageId'),
{ uuid: false }
)
// if you want to restrict pages to a single notion workspace (optional)
export const rootNotionSpaceId: string | null = parsePageId(
getSiteConfig('rootNotionSpaceId', null),
{ uuid: true }
)
// general site config
export const name: string = getSiteConfig('name')