feat: refactoring config to site.config.js

This commit is contained in:
Travis Fischer
2021-01-19 20:54:08 -05:00
parent b58d2b69f6
commit 6707fc8d56
17 changed files with 243 additions and 175 deletions

View File

@@ -12,7 +12,8 @@ import {
// socialImageSubtitle,
defaultPageCover,
defaultPageIcon,
rootNotionPageId
rootNotionPageId,
socialImageSubtitle
} from '../../lib/config'
export interface SocialImageConfig {
@@ -80,7 +81,8 @@ export default async (req: NextApiRequest, res: NextApiResponse) => {
logo: mapNotionImageUrl(defaultPageIcon, block),
title: isRootPage
? socialImageTitle
: getBlockTitle(block, recordMap) || socialImageTitle
: getBlockTitle(block, recordMap) || socialImageTitle,
subtitle: isRootPage ? socialImageSubtitle : undefined
// subtitle: getPageDescription(block, recordMap) || socialImageSubtitle
})