Sphinx extension to build Notion pages.
Project description
Notion Builder for Sphinx
Extension for Sphinx which enables publishing documentation to Notion.
Installation
sphinx-notionbuilder is compatible with Python 3.11+.
$ pip install sphinx-notionbuilder
Add the following to conf.py to enable the extension:
"""Configuration for Sphinx."""
extensions = ["sphinx_notion"]
For collapsible sections (toggle blocks), also add the sphinx-toolbox collapse extension:
"""Configuration for Sphinx."""
extensions = [
"sphinx_notion",
"sphinx_toolbox.collapse",
]
Supported markup
The following syntax is supported:
Headers
Bulleted lists
Code blocks
Table of contents
Block quotes
Note, warning, and tip admonitions
Collapsible sections (using sphinx-toolbox collapse directive)
See a sample document source and the published Notion page.
Uploading Documentation to Notion
After building your documentation with the Notion builder, you can upload it to Notion using the included command-line tool.
Prerequisites
Create a Notion integration at https://www.notion.so/my-integrations
Get your integration token and set it as an environment variable:
$ export NOTION_TOKEN="your_integration_token_here"
Usage
$ notion-upload -f path/to/output.json -p parent_page_id -t "Page Title"
Arguments:
-f, --file: Path to the JSON file generated by the Notion builder
-p, --parent_page_id: The ID of the parent page in Notion (must be shared with your integration)
-t, --title: Title for the new page in Notion
The command will create a new page if one with the given title doesn’t exist, or update the existing page if one with the given title already exists.
Supported features
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file sphinx_notionbuilder-2025.8.24.tar.gz.
File metadata
- Download URL: sphinx_notionbuilder-2025.8.24.tar.gz
- Upload date:
- Size: 31.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
50b4b12eee82b94428795525b92199c4248df44a4b83f57236d81ad175e508b2
|
|
| MD5 |
a8f5c4e2312d3055ae13ce44922728b7
|
|
| BLAKE2b-256 |
0869ffc1c6665b7bbfd1889e5aad0dbe485c08d24fc605569f6bf0b847090994
|
Provenance
The following attestation bundles were made for sphinx_notionbuilder-2025.8.24.tar.gz:
Publisher:
release.yml on adamtheturtle/sphinx-notionbuilder
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
sphinx_notionbuilder-2025.8.24.tar.gz -
Subject digest:
50b4b12eee82b94428795525b92199c4248df44a4b83f57236d81ad175e508b2 - Sigstore transparency entry: 427689650
- Sigstore integration time:
-
Permalink:
adamtheturtle/sphinx-notionbuilder@e905e9fea3d6f38aa0cfded928a2006a0a2f933f -
Branch / Tag:
refs/heads/main - Owner: https://github.com/adamtheturtle
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@e905e9fea3d6f38aa0cfded928a2006a0a2f933f -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file sphinx_notionbuilder-2025.8.24-py2.py3-none-any.whl.
File metadata
- Download URL: sphinx_notionbuilder-2025.8.24-py2.py3-none-any.whl
- Upload date:
- Size: 14.4 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
978b4d89b82a129ed57256ce4f97a79f6921d68e9c8d0b90c004d81641b6c466
|
|
| MD5 |
7d57fe6365c6bf5ce0dd166c3dcf3f3f
|
|
| BLAKE2b-256 |
147e5a22490bd3f78075c63c61a4edcd5739d1133a4b5477bbafccb0716fc61d
|
Provenance
The following attestation bundles were made for sphinx_notionbuilder-2025.8.24-py2.py3-none-any.whl:
Publisher:
release.yml on adamtheturtle/sphinx-notionbuilder
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
sphinx_notionbuilder-2025.8.24-py2.py3-none-any.whl -
Subject digest:
978b4d89b82a129ed57256ce4f97a79f6921d68e9c8d0b90c004d81641b6c466 - Sigstore transparency entry: 427689652
- Sigstore integration time:
-
Permalink:
adamtheturtle/sphinx-notionbuilder@e905e9fea3d6f38aa0cfded928a2006a0a2f933f -
Branch / Tag:
refs/heads/main - Owner: https://github.com/adamtheturtle
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@e905e9fea3d6f38aa0cfded928a2006a0a2f933f -
Trigger Event:
workflow_dispatch
-
Statement type: