📄
Required key
NOTION_API_KEY=secret_QoIn8edvksjn…
typescript
NOTION_API_KEY
via a Notion “Integration”.
Optional keys
Regular use
PUBLISHABLE_STATUS=Publishable
OUTPUT_PATH=
OUTPUT_STATIC_FOLDER=
typescript
Default values if left unset
PUBLISHABLE_STATUS
defines the string that notion2svelte uses to filter against your pages’ Status prop; if Status is not set to (by default) Publishable, the page won’t be included.
OUTPUT_PATH
tells notion2svelte where to
save .svelte files. If left empty (the default), notion2svelte will output to the current directory.
OUTPUT_STATIC_FOLDER
tells notion2svelte where to
save media files, esp. images. Again, the default is empty, meaning images will
be stored in ./static/Debugging
NOTION_TEST_PAGE_ID=b0f0dfbbthisisfakecd9039c7466476
CACHE_TOKEN=b0f0dfbbthisisfakecd9039c7466476
# FORCE_REFRESH=true
typescript
NOTION_TEST_PAGE_ID
skips the pages-from-database loop, and fetches
just the one page specified.
CACHE_TOKEN
tells notion2svelte whether it should
fetch the test page:
FORCE_REFRESH
, when set to true
, tells notion2svelte to ignore the cache token & hit the Notion API every time.
🏠 Browse the docs ⚘
High-level Discussion
Turn-intoable Block Components
Toggle Headings (not yet implemented)
Layout-only Components
Page-level Components
Annotation Components
bold → <strong>
italic → <em>
strikethrough → <s>