Options passed to the page builder class. Configures the underlying Notion client. Structural options and formatting options are passed to individual methods.
integrationSecret: string
The integration secret for your Notion workspace. This must be set up as described in https://developers.notion.com/docs/create-a-notion-integration. In a nutshell:
- Head to https://www.notion.com/my-integrations.
- Add a new integration.
- Give it a name, and select "internal" for the integration type.
- Recommended: reduce the permissions to be read-only.
Now you should be able to reveal and copy your "Internal Integration
Secret". This secret should not be committed to your version control
software; that means, do not set this option to a string directly.
Instead, configure a secret or environment variable and use that,
for example, integrationSecret: process.env.MY_NOTION_SECRET
.
By default (i.e. if you do not pass this option at all) the plugin
looks for an environment variable by the name of
NOTION_INTEGRATION_SECRET
. If your environment specifies this
variable already, and you don't want that to be used, set this option
explicitly using an environment variable under a different name, as
described above.
notionClientOptions: Omit<Record<string, unknown>, "auth">
An object of properties to pass down to the underlying Notion client.
Notably, the auth
option must not be supplied; it is read from the
integrationSecret
option. Also, this package specifies its own custom
fetch
option, in order to work with Notion's rate limits of ~3 requests
per second. It is recommended not to overwrite that.