mirror of
https://github.com/d0zingcat/nextjs-notion-starter-kit.git
synced 2026-05-19 15:10:20 +00:00
fix: prod build
This commit is contained in:
@@ -10,9 +10,7 @@ const notion = new NotionAPI({
|
||||
export default notion
|
||||
|
||||
export async function getPage(pageId: string): Promise<ExtendedRecordMap> {
|
||||
const recordMap = await notion.getPage(pageId, {
|
||||
fetchParents: false
|
||||
})
|
||||
const recordMap = await notion.getPage(pageId)
|
||||
const blockIds = Object.keys(recordMap.block)
|
||||
|
||||
const imageUrls: string[] = blockIds
|
||||
|
||||
@@ -37,9 +37,8 @@ export async function getStaticPaths() {
|
||||
|
||||
const ret = {
|
||||
paths: siteMaps.flatMap((siteMap) =>
|
||||
siteMap.pageIds.map((pageId) => ({
|
||||
Object.keys(siteMap.canonicalPageMap).map((pageId) => ({
|
||||
params: {
|
||||
domain: siteMap.site.domain,
|
||||
pageId
|
||||
}
|
||||
}))
|
||||
|
||||
@@ -2,7 +2,12 @@
|
||||
"version": 2,
|
||||
"build": {
|
||||
"env": {
|
||||
"GOOGLE_APPLICATION_CREDENTIALS": "@notionx-api-google-application-credentials"
|
||||
"GOOGLE_APPLICATION_CREDENTIALS": "@transitive-bullshit-google-application-credentials",
|
||||
"GCLOUD_PROJECT": "@transitive-bullshit-gcloud-project",
|
||||
"FIREBASE_COLLECTION_IMAGES": "@transitive-bullshit-firebase-collection-images",
|
||||
"DOMAIN": "@transitive-bullshit-domain",
|
||||
"NOTION_ROOT_PAGE_ID": "@transitive-bullshit-notion-root-page-id",
|
||||
"FATHOM_ID": "@transitive-bullshit-fathom-id"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user