We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 149915e + 2901499 commit 75265e0Copy full SHA for 75265e0
lib/get-site-map.ts
@@ -1,4 +1,4 @@
1
-import { getAllPagesInSpace, uuidToId } from 'notion-utils'
+import { getAllPagesInSpace, uuidToId, getPageProperty } from 'notion-utils'
2
import pMemoize from 'p-memoize'
3
4
import * as config from './config'
@@ -47,6 +47,11 @@ async function getAllPagesImpl(
47
throw new Error(`Error loading page "${pageId}"`)
48
}
49
50
+ const block = recordMap.block[pageId]?.value
51
+ if (!(getPageProperty<boolean|null>('Public', block, recordMap) ?? true)) {
52
+ return map
53
+ }
54
+
55
const canonicalPageId = getCanonicalPageId(pageId, recordMap, {
56
uuid
57
})
0 commit comments