mirror of
https://github.com/d0zingcat/nextjs-notion-starter-kit.git
synced 2026-05-13 23:16: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')
|
||||
|
||||
@@ -8,6 +8,7 @@ export const getSiteForDomain = async (
|
||||
domain,
|
||||
name: config.name,
|
||||
rootNotionPageId: config.rootNotionPageId,
|
||||
rootNotionSpaceId: config.rootNotionSpaceId,
|
||||
description: config.description
|
||||
} as types.Site
|
||||
}
|
||||
|
||||
@@ -2,6 +2,9 @@ module.exports = {
|
||||
// where it all starts -- the site's root Notion page (required)
|
||||
rootNotionPageId: '78fc5a4b88d74b0e824e29407e9f1ec1',
|
||||
|
||||
// if you want to restrict pages to a single notion workspace (optional)
|
||||
rootNotionSpaceId: null,
|
||||
|
||||
// basic site info (required)
|
||||
name: 'Transitive Bullshit',
|
||||
domain: 'transitivebullsh.it',
|
||||
|
||||
Reference in New Issue
Block a user