mirror of
https://github.com/d0zingcat/nextjs-notion-starter-kit.git
synced 2026-05-13 15:09:47 +00:00
feat: add rootNotionSpaceId optional config
This commit is contained in:
@@ -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')
|
||||
|
||||
Reference in New Issue
Block a user